API reference
Gateway
The real-time WebSocket gateway. Only the upgrade is described here; the protocol (ops, events, payloads and close codes) is in the Gateway guide.
Every path is relative to https://api.palloo.app/v1.
Send a bot token as Authorization: Bearer palloo_bot_... unless the operation says otherwise; see Authentication.
On this page
Connect gateway
/gateway
No token: Needs no token.
Open a real-time gateway connection (WebSocket upgrade).
Send a standard WebSocket upgrade request. No Authorization header: the client
authenticates inside the connection by sending identify with its token after the
server's hello. Any origin is accepted, since authentication never uses cookies.
Everything after the upgrade (ops, events, payloads, heartbeats, close codes and how to
reconnect and catch up over GET /channels/{id}/messages?after=) is described in
the Gateway guide, because OpenAPI cannot describe a WebSocket protocol.
Try it: the gateway is a WebSocket, which Try it does not open. See the Gateway guide to connect.
Responses
- 101
-
Switched to the WebSocket protocol. The server sends
hellofirst. - 426
-
upgrade_required: the request was not a WebSocket upgrade.Body: Error
Upgradeheader. - 429
-
rate_limited: too many attempts. Every operation a bot calls is also limited per bot (50 at once, then 50 per second), so any authenticated operation can answer this to a bot. Changes to a community's structure (creating or changing the community, channels, roles, member roles, overwrites, invites, kicks, bans, timeouts, report updates and actions, and bots) are also limited per caller (30 at once, then 1 per second) and per community (60 at once, then 1 per second), and creating communities per caller (10 at once, then 1 every 5 minutes).Body: Error
Retry-Afterheader. - 503
-
gateway_unavailable: this server is shutting down. Retry; the load balancer will route the next attempt to another server.Body: Error