Skip to content

Gateway

Before opening a WebSocket you should ask the API for the current gateway address and session limits. There is one endpoint — GET /gateway/bot. It requires a Bot token.

Requires: Authorization: Bot <token>

Окно терминала
curl https://floodilka.com/api/v1/gateway/bot \
-H "Authorization: Bot YOUR_BOT_TOKEN"
{
"url": "wss://gateway.floodilka.com",
"shards": 1,
"session_start_limit": {
"total": 1000,
"remaining": 999,
"reset_after": 14400000,
"max_concurrency": 1
}
}
FieldTypeDescription
urlstringWSS URL to connect to. Append query params: ?v=1&encoding=json
shardsintegerRecommended shard count. Small bots always get 1
session_start_limit.totalintegerTotal new IDENTIFY calls in the current window
session_start_limit.remainingintegerCalls left in the current window
session_start_limit.reset_afterintegerMilliseconds until the window resets
session_start_limit.max_concurrencyintegerHow many parallel IDENTIFY calls are allowed
Why these limits?

They protect the cluster from a storm of bots that hit reconnect → IDENTIFY → crash in a loop and drain resources. A healthy client does 1–2 IDENTIFYs per session and never touches the limit. If you do — check your logs, most likely you have an infinite reconnect loop somewhere.