Skip to content

Receiving notifications via HTTP API#

You can receive incoming notifications (messages, statuses) through HTTP API requests in the same way as the other Telegram messenger API methods are implemented.
At the same time, the chronological order of notifications is guaranteed in the sequence in which they were received, FIFO.

All incoming notifications are stored in the queue and wait to be received for 24 hours.

To receive incoming notifications, you need to call two methods sequentially:

Instance configuration#

Before receiving incoming notifications, you need to configure the instance.

The instance can be configured programmatically using the SetSettings method, or interactively in the console interface.

Configuration using the SetSettings method#

To set up receiving incoming notifications with the HTTP API technology, you need to leave the webhookUrl parameter empty.
You also need to specify which kinds of notifications you need to receive.

Request body example for the SetSettings method#

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

Configuration in the console#

  1. Go to the console
  2. Select the instance whose settings you need to change
  3. Click the Change button on the instance panel
  4. Turn on the toggles for the required kinds of notifications
  5. Click the Save changes button to apply the settings.

Receiving incoming notifications#

After configuring the instance, you can start receiving notifications using the ReceiveNotification and DeleteNotification methods.

A detailed description of the incoming notification format is presented in the Incoming notifications format section.