Skip to content

To Partners#

For testing the methods of partners, we recommend to use the Postman for partners collection.

The partnership scheme of cooperation involves deeper integration with the service and work with a larger number of instances on your side:

  • API instances management

  • Postpaid cooperation plan (from the second month of cooperation)

  • Daily billing (for created and non-deleted instances)

  • Personal support chat

In case of any questions in regard to the partnership scheme and additional conditions, please send us a message to support@green-api.com or chat on the website.

Important!

Payment for instances for partners is written off at 00:00 UTC+3:00.

Setting up API for partners:
1. Getting a partnership token
2. Preparing and working with a partner’s personal account
3. Methods testing
4. Request Format
5. API methods available for partners
6. Work order

Getting a partnership token#

You may get a partnership API-token via support@green-api.com Green API technical support.

Before requesting a partner key, we recommend familiarizing yourself with section Preparing and working with a partner’s personal account.

Preparation and working with a partner’s personal account#

  • To work with partner instances, we recommend creating a separate personal account. Register the account with your corporate email to ensure you do not lose personal account data in case of employee turnover.

  • After switching your personal account to work with the partner program (you will be provided with a partner key), instance creation and deletion should only be done through the API. Creating instances from the personal account will result in an error.

  • If your personal account contains instances under the Business tariff, they will be billed according to the standard scheme (instances may expire, and renewal will require payment on the website). Changing the billing to the partner program is not possible.

  • We recommend that after receiving the partner key, you delete all existing instances from the personal account and create instances through the API.

  • For testing and integration setup, developers should use a separate personal account and instances under the Developer tariff. Quota increases for instance creation can be requested through the technical support channel.

Methods testing#

For testing the methods of partners, we recommend to use the Postman for partners collection.

The partner key has the following format: gac.1234567891234567891234567891213456789.

To work with the collection, you must first get a partnership API token via support@green-api Green API technical support.

Help for Postman installation

Request format#

Request to API should be executed at:

{{APIUrl}}/partner/{method}/{{partnerToken}}

{APIUrl} - (string) - API host name;

{method} - (string) - API method name;

{partnerToken} - (string) - partner's token, you get it via Green API technical support;

API methods available for partners#

createInstance - method for creating a messanger account instance on the partner's part

deleteInstanceAccount - method for deleting a partner's account instance

getInstances - method returns all the accounts instances created by the partner

Work order#

  1. Create an instance by createInstance method
  2. Authorize a new instance on your phone. To do this go to your personal area and scan a QR-code.

    Additionally, the display of a QR code can be implemented in the interface of your software product. To do this, it is recommended to use the code examples below:

    • Getting a QR-code through HTTP-request

    • Getting a QR-code via web-socket

    • Getting a QR-code in

    • Besides you may receive a QR code on a separate page on the Internet:

      https://qr.green-api.com/waInstance{idInstance}/{apiTokenInstance}
      

    • Connection via phone number is also implemented

    idInstance and apiTokenInstance may be obtained by the createInstance and getInstances methods.

  3. The instance is ready for work. To send and get messages use API methods according to documentation