Skip to content

Postman collection on your computer#

Beta version

The functionality is in beta. Features may change and may also work unstably.

Postman is a popular tool for testing and developing APIs.
To make it easier for developers to integrate with Instagram, we have prepared a Postman collection with a full set of the required API methods.

  1. Setup: Postman and collection import
  2. Configure: environment setup
  3. Test: API methods use

Setup#

To start, download the components below and install Postman:

After installing and running Postman, click on Import and select from the Postman collection on GitHub package the collection file - collection.en.json (English) or collection.ru.json (Russian) - and the environment file environment.json. The collections contain the same requests and examples and differ only in the language of the names and descriptions.

Collection import

After importing, you will see the Green-API EN Instagram collection in the Collections section and you can select GREEN-API Developer as the Environment.

Configure#

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.

The pre-configured GREEN-API Developer environment contains the complete set of variables referenced by the collection. Some of these variables should be edited and replaced with your own values. To open the edit dialog, click the little eye button next to the environment dropdown and select Edit.

Set the values of the four variables apiUrl, mediaUrl, idInstance and apiTokenInstance, which were obtained at the Before you start stage.

Test#

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 discussed in the API Documentation. You can make any changes to these methods to make it easier to test them and process responses.

Addressing in the collection examples

The request examples use the numeric Chat identifier in the chatId field. If you only have a username, specify it in the same field with the @ prefix - the same way as in the API Documentation. The separate username field is accepted by the CheckAccount method only.