Gateway Overview
The gateway reports what your bots are doing right now: who is connected, who is in the party, and which shard is serving them. Creating a bot, editing it, and running a command still go through the API.
Two ways to read it
- REST, documented in the gateway reference and explained in REST interface. Use this when you want the current party, presence, or shard list.
- The lists only include bots with a live connection. An offline bot still appears in GET /bots on the API, and it does not appear here.
Polling the gateway also keeps you off the API routes that manage bots. The two services have separate rate limits.
Match the API ids
The gateway does not have its own bot ids.
{botId}isidfrom GET /bots.FNLB_BUCKET_IDisidfrom GET /user, orsubfrom GET /oauth2/userinfo.- A shard's
categoriesare the same category ids as GET /categories and the SDKcategoriesarray. clusterNameis the name you passed to the SDK orCLUSTER_NAMEin self-hosting.
Run a command on the API, then read GET /bots/{botId} if you need the party that command changed. The command response itself is only the bot's text reply.
What people use it for
- A dashboard of bots that are online, booting, or busy.
- Party members, outfits, and who is the leader.
- Shard health: how many bots a cluster was asked to run, and how many are connected.
Next
- REST interface
The base URL, the account id parameter, and the status values.
- Gateway reference
Every route, with fields and the try client.