For 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
-
Post-payment cooperation plan (from the second month of cooperation)
-
Instances continue to work even with a negative balance
-
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.
To determine the type of your account, follow the next order in console
Account
->Account information
->Account type
->Partner
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 console
3. Payment for the Partner instances
4. Methods testing
5. Request Format
6. API methods available for partners
7. 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 console.
Preparation and working with a partner’s console#
-
To work with partner instances, we recommend creating a separate console. Register the account with your corporate email to ensure you do not lose console data in case of employee turnover.
-
After switching console to work with the partner program (you will be provided with a partner key), instance creation and deletion can be done through the API or the console.
-
If console contains instances under the Business plan, 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 console and create instances through the API.
-
For testing and integration setup, developers should use a separate console and instances under the Developer plan. Quota increases for instance creation can be requested through the technical support channel.
Payment for the Partner instances#
Instances on the Partner plan operate on a post-payment system. Partners do not need to monitor the balance. When the balance switches to negative, instances will continue to operate as usual. Every month we send billings with transcripts to instances. We will then issue an invoice if you pay by invoice. The invoice for the previous month must be paid by the 15th day of the month following the reporting month.
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:
{{partnerApiUrl}}/partner/{method}/{{partnerToken}}
{partnerApiUrl} - (string) - API host name, you can find it in your console
{method} - (string) - API method name;
{partnerToken} - (string) - partner's token, you get it via Green API technical support;
API methods available for partners#
getInstances - method returns all the accounts instances created by the partner
createInstance - method for creating a messanger account instance on the partner's part
deleteInstanceAccount - method for deleting a partner's account instance
Work order#
- Create an instance by createInstance method
-
Authorize a new instance on your phone. To do this go to console 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 1С
-
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.
-
-
The instance is ready for work. To send and get messages use API methods according to documentation