Skip to content

Receive webhooks via HTTP API#

You can get incoming webhooks (messages, statuses) via HTTP API requests in the similar way as the rest of the GreenWaba methods are implemented. Herewith, the chronological order of the webhooks following is guaranteed in the sequence in which they were received FIFO. All incoming webhooks are stored in the queue and are expected to be received within 24 hours.

To get incoming webhooks, you have to sequentially call two methods ReceiveNotification and DeleteNotification. ReceiveNotification method receives an incoming webhook. DeleteNotification method confirms successful webhook receipt and processing. To learn more about the methods, refer to respective ReceiveNotification and DeleteNotification sections.

Incoming webhooks are stored for 24 hours.

Account setup#

Before receiving incoming webhooks, you need to set up your account. Account settings can be performed in software using SetSettings method, or online in Console interface.

Setup by SetSettings method#

To set up receiving incoming webhooks using HTTP API technology, you need to fill the setting blank the value as webhookUrl parameter. It is also required to specify what types of webhooks you need to receive. To enable incoming webhooks by type, as well as to specify webhookUrl parameter, use SetSettings method.

Example of SetSettings method request body#

{
    "webhookUrl": "",
    "outgoingWebhook": "yes",
    "incomingWebhook": "yes"
}

Setup in Console#

You can also set up to receive incoming webhooks online. To do this, go to Console and select the required user account. If the account is authorized, the settings for receiving incoming webhooks will be displayed, see fig. Specify the webhookUrl parameter, as well as the switches by webhooks types. f the account is not authorized and the webhooks settings are not displayed, refer to Before you start section.

Incoming webhooks settings

Receive incoming webhooks#

A detailed description of incoming webhooks format is given in Incoming webhooks format.