Receive notifications via HTTP API#
Beta version
The functionality is in beta. Features may change and may also work unstably.
You can get incoming notifications (messages, statuses) via HTTP API requests in the similar way as the rest of the Instagram API methods are implemented.
Herewith, the chronological order of the notifications following is guaranteed in the sequence in which they were received FIFO.
All incoming notifications are stored in the queue and are expected to be received within 24 hours.
To get incoming notifications, you have to sequentially call two methods:
- the ReceiveNotification method receives an incoming notification;
- the DeleteNotification method confirms the successful receipt and processing of the notification.
Instance setup#
Before receiving incoming notifications, you need to set up your instance.
Instance settings can be performed in software using the SetSettings method, or online in the console interface.
Setup by the SetSettings method#
To set up receiving incoming notifications using the HTTP API technology, you need to leave the webhookUrl parameter blank.
It is also required to specify what types of notifications you need to receive.
Example of the SetSettings method request body#
{
"webhookUrl": "",
"outgoingWebhook": "yes",
"outgoingMessageWebhook": "yes",
"outgoingAPIMessageWebhook": "yes",
"stateWebhook": "yes",
"incomingWebhook": "yes",
"incomingMessageStatusWebhook": "yes"
}
Setup in the console#
- Go to the console
- Select the instance whose settings you need to change
- Click the
Changebutton on the instance panel - Turn on the switches for the required types of notifications
- Click the
Save changesbutton to apply the settings.
Receive incoming notifications#
After setting up the instance, you can start receiving notifications by the ReceiveNotification and DeleteNotification methods.
A detailed description of the incoming notifications format is given in the Incoming notifications format section.