跳转到主要内容
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[]