Before you start#
Before you start working with the Telegram messenger, you need to:
- Install the Telegram mobile application
- Register in the Green-API console
- Create and authorize an instance
- Get the instance access parameters
- Set up receiving incoming data
- Read about the differences of the Telegram version
1. Installing the Telegram mobile application#
Sending and receiving Telegram messenger messages is performed from an already existing account.
-
Install the official mobile application:
-
Open the application and tap
Log in - Enter your phone number, a code will be sent to you to confirm the login
- The confirmation code will be sent to the Telegram application (if you are already authorized on another device) or by SMS.
After registering in the mobile application, you will be able to use all of its features - send and receive messages, make calls, etc.
2. Registration in the console#
To use the service, go to the console and register. The registration procedure:
-
Enter your email
We recommend using a corporate email to prevent losing access to the account when an employee leaves
-
Select a country
- Accept the user agreement and click the
Sign upbutton -
An email will be sent to the specified email address. Enter the code from the email to confirm your account
In addition to the general inbox, we recommend checking the
Spamfolder, as the email may end up there

3. Creating and authorizing an instance#
What an instance is#
An instance is a unique gateway number for sending and receiving messages through the Telegram messenger.
It is the link between your messenger account and the API for sending requests and receiving notifications.
An instance is created in the console and is used to organize the Telegram messenger HTTP API.
Important
One instance can serve only one Telegram account (one phone number) at a time.
To connect several accounts, you need to create a separate instance for each Telegram account (each instance is billed separately)
Creating an instance#
The procedure for creating an instance:
- In the console, click the
Create an instancebutton - Select a plan
- If the plan requires payment, select a payment method and confirm the payment
-
Go to the list of instances by clicking the
Instancesbutton in the side menu. In the list you can see the instance you createdIt may take up to 2 minutes for the instance to become operational after creation

Instance authorization#
To work with GREEN-API, you need to authorize an instance.
Authorization is performed in the console in one of two ways:
- Open the Telegram application on your mobile device
- Open the menu
☰➠⚙ Settings➠🖳 Devices➠Link Desktop Device - In the console, select the required instance
- Click the
Get QRbutton and scan the code in the mobile application

-
Use the StartAuthorization method to get an authorization code
The code will arrive in the messenger service chat or by SMS

-
Send the received code using the SendAuthorizationCode method
If your account is protected by a password, also specify it in the
passwordfieldIf you sent
SendAuthorizationCodewith the code but without the password, you can send it separately using theSendAuthorizationPasswordmethod
We recommend performing authorization by the QR method
4. Get the instance access parameters#
To execute Telegram messenger HTTP API requests, you need to use the instance access parameters. The access parameters are published in the console:
apiUrl- link to the API hostmediaUrl- link to the API host for sending filesidInstance- unique instance number-
apiTokenInstance- instance access key
The instance access key can be changed if necessary, for example, if it has been compromised. You can change the token in the console yourself or by contacting technical support.
5. Set up receiving incoming data#
If you need to receive incoming data (incoming messages, statuses of previously sent messages, etc.), you first need to configure the instance.
6. Key differences of the Telegram version#
The Telegram version is developed on the basis of the current version of GREEN-API.
The architecture and logic of interaction with the API remain the same, however there are a number of differences due to how the Telegram messenger works.
You can read about the specifics of this version in the article Key differences of the Telegram version.
Done!#
Everything is ready to start sending and receiving messages through the Telegram messenger!