To test and debug requests to the Green API it is recommended to use Green API - Postman Collection
Postman - a widespread tool for API testing and development. To make it easier for developers to integrate with the Green API, we have created a Postman collection with a complete set of required API.
To start, download the components below and install Postman:
- Postman application
- Green API - Postman Collection collection (clone the repository or download the package as a ZIP file)
After installing and running Postman, click on
Import and select the two JSON files
environment.json from the Postman collection on GitHub.
After importing, you will see a
Green API item in
Collections section and you can select
Green API Developer as
A custom Postman environment is actually a collection of "key-value" pairs. You can create standard variables that will be then used in different requests. More on Postman environment variables.
Green API Developer environment contains the complete set of variables, referened by the collection. Some of these variables should be edited and replaced with customer values. To open the edit dialog, click the little eye button next to the environment dropdown and select
Set values of the two variaables
apiTokenInstance, which were got at Before you start stage.
Now you can select any API method in the collection and start sending requests. For convenience, all methods are listed in the same order as they are reviewed in API documents. You can make any changes to these methods to make it easier to test them and process responses.