Skip to content

Execute requests#

To execute a request to the Green API, you have to execute GET, POST or DELETE request at

{{apiUrl}}/waInstance{{idInstance}}/{{method}}/{{apiTokenInstance}}

The request address is generated from the API host apiUrl/mediaUrl, the instance number idInstance and the access keyapiTokenInstance, which must be obtained in advance in console in accordance with Before you start section.

The required API method, described in API documents is used as method parameter.

Example of a request to send a message by SendMessage method:

https://api.greenapi.com/waInstance1234/SendMessage/bde035edae3fc00bc116bd112297908d8145e5ba8decc5d884

Request titles#

Most requests should contain standard titles:

  • Content-Type - application/json

In some cases titles may differ, for example, for SendFileByUpload file sending method

Debug requests#

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