Перейти к основному содержанию
GET
/
api
/
updates
/
poll
Poll for updates
curl --request GET \
  --url http://localhost:8080/api/updates/poll \
  --header 'Authorization: Bearer <token>'
{
  "ok": true,
  "result": [
    {
      "update_id": 100000001,
      "message": {
        "message_id": 42,
        "text": "Hello"
      }
    }
  ]
}

Авторизации

Authorization
string
header
обязательно

API key with bmx_ prefix. Obtain via /api/auth/api-keys.

Параметры запроса

bot_id
integer
обязательно

Bot ID to poll updates for

offset
integer
по умолчанию:0

Acknowledge updates with update_id < offset (Telegram getUpdates semantics)

limit
integer
по умолчанию:100

Maximum number of updates to return

Требуемый диапазон: x <= 100
timeout
integer
по умолчанию:30

Seconds to wait for updates before returning empty result

Требуемый диапазон: x <= 60

Ответ

Telegram-compatible getUpdates response

Telegram-compatible getUpdates response

ok
boolean
Пример:

true

result
object[]