FNLB Devs

Developer Portal

Gateway

Gateway REST Interface

The gateway REST API returns current state. Field lists live on each route in the gateway reference, which is generated from the same service. This page covers the rules those routes share. Base URL:

https://gateway.fnlb.net/v1

Authentication

Send the same Authorization header as the API. The gateway accepts:

  • an API token, only if the account has developer access
  • an OAuth2 access token with the bots.read scope

A session from the website is not accepted here. Use Try request in the reference only when that client can send one of the tokens above.

curl "https://gateway.fnlb.net/v1/bots?FNLB_BUCKET_ID=YOUR_ACCOUNT_ID" \
  -H "Authorization: Bearer FNLB_YOUR_API_TOKEN"

Your account id is the id from GET /user.

Routes

  • GET /bots

    Every bot connected to the gateway for this account.

  • GET /bots/{botId}

    One connected bot, including its party when it has one.

  • GET /shards

    Clusters serving those bots, with capacity and version.

GET /bots is not the catalog of bots you own. Offline bots are omitted. Use GET /bots on the API for that list.

Status

status on a bot is a number:

ValueState
0Offline
1Booting
2Available
3Busy
4Disconnected

Party member flags

When party is present, each member has a flags bitfield:

BitMeaning
1Ready
2Leader
4Sitting out
8Playing

The boolean fields isReady, isLeader, isSittingOut, and isPlaying are still sent. Prefer flags. The booleans will be removed later.

Polling

Stay inside the gateway limits: 100 requests per 10 seconds for the whole gateway, 100 per minute shared by the bot routes, and 100 per minute for shards. A dashboard can refresh every 10 to 30 seconds.