Skip to content

Before you start#

Before you start working with Green API you are required to follow the below steps:

  1. Install the WhatsApp mobile application
  2. Registration in the console
  3. Create and authorize an instance
  4. Get access parameters to instance
  5. Set receiving incoming data

Registering a new WhatsApp number

If you are using a new number that has not been previously used in WhatsApp, we recommend that you read the article How to protect a number from ban?

Video instruction#

1. Install the WhatsApp mobile application#

Sending and receiving WhatsApp messages is done from your mobile phone. The phone must have the official WhatsApp or WhatsApp Business mobile app installed.

Сhoice of application

Choosing the WhatsApp or WhatsApp Business application does not affect the probability of account blocking.

It is recommended to order Handset hosting service. In this case, a personal mobile phone is not required. Sending and receiving WhatsApp messages will be carried out from a mobile phone located in the Green API data center.

2. Registration in the console#

To use our service, go to the console and register. The registration process:

  1. Enter your email address.

    We recommend using a corporate email to prevent the loss of account access in case an employee leaves.

  2. Enter a password and confirm it. The password should be at least 6 characters long.

  3. Select your country.
  4. After accepting the user agreement, click on the Register button.
  5. An email will be sent to your email address. Enter the code provided in the email to confirm your account.

3. Create and authorize an instance#

Instance Creation#

An instance is a unique gateway number for sending and receiving messages through WhatsApp.

Instances are created in console and are used for organizing the WhatsApp HTTP API.

One instance can simultaneously serve only one phone number (one WhatsApp account). You can create multiple instances under a single account.

Steps to create an instance:

  1. In console, click on the Create an instance button.
  2. Choose a plan.
  3. If required, select a payment method and make the payment.
  4. Go to the list of instances by clicking on Instances in the side menu. You will see the instance you created in the list.

It may take up to 2 minutes for an instance to become operational after creation.
QR code generation is possible 2 minutes after instance creation.


Instance Authorization#

To work with the Green API, you need to authorize your instance. Instance authorization is done in the console by scanning a QR code from the WhatsApp Business or WhatsApp mobile application.

Here's how to authorize an instance:

  1. Open the WhatsApp Business or WhatsApp application on your mobile phone. On your device, go to the Link a device section. To do this:

    • On Android, tap on the three dots -> Linked Devices -> Link a device.
    • On iPhone, go to Settings -> Linked Devices -> Link a device.
  2. In console, select the desired instance.

  3. Click the Get QR button. Scan the QR code using your mobile application.

    get-gr-button-en

More information on "How to set up device pairing" can be found in our article.
We also recommend reading the article "Why Can't I connect the device to the API?"

Sending and receiving messages are performed through your mobile phone. Therefore, your phone must always be charged and connected to the internet.

4. Get access parameters to instance#

To execute HTTP API WhatsApp requests, you need to use the access parameters to instance. Access parameters are published in console:

  • apiUrl - API host link
  • mediaUrl - API host link for sending files
  • idInstance - instance unique number
  • apiTokenInstance - instance access key

Instance access key can be changed if necessary, for example, if it is compomised. You can change the token in console yourself or contact tech support.

5. Set receiving incoming data#

If you need to receive incoming data (incoming messages, previously sent messages statuses, etc.), then you have first to make instance setup. You can get incoming webhooks via HTTP API or Webhook Endpoint.

Done!#

Everything is ready to start sending and receiving WhatsApp messages!

To debug requests to the Green API, it is recommended to use the API section in the console or the Postman collection. To simplify the integration process, you can use ready-made libraries available in the SDK section.