FNLB Developer Documentation
Guides, the API reference, the gateway reference, and your applications all live in this portal. Use a guide when you need to know how something works. Open the reference when you need the exact request.
In this portal
- Applications hold the OAuth2 client id, client secret, redirect URIs, and scopes for an app that acts on someone else's account. Open them from the sidebar.
- Guides are these pages: authentication, OAuth2, rate limits, CDN assets and application icons, the gateway, the SDK, and self-hosting.
- API reference is the interactive catalog for
https://api.fnlb.net/v1. Each page shows the method, path, body, and responses, and you can try a request while you are signed in. - Gateway reference is the same kind of catalog for
https://gateway.fnlb.net/v1. It shows bots that are connected right now, their parties, and the shards serving them.
The API is where a bot is created, configured, and told to run a command. The gateway is where you read what that bot is doing after it is online.
The same ids
These values show up in more than one place. Use the id from the first call as the path or query value on the next one.
| Value | Where you read it | Where you send it |
|---|---|---|
| Account id | GET /user id | Gateway query FNLB_BUCKET_ID |
| Bot id | GET /bots id | Command, friends, and GET /bots/{botId} |
| Category id | GET /categories id | Bot parent, SDK categories, self-host CATEGORIES |
A bot that is offline is still in the API list. It is missing from the gateway list until that process connects.
A call, then the live state
- Create an API token for your own account, or an OAuth2 access token after a user approves your application.
- GET /bots returns
idandparentfor each bot.parentis the category id. - POST /bots/{botId}/commands/run runs a command on that id. The reply is text plus a format code, not the new party state.
- GET /bots/{botId} on the gateway, with your account id as
FNLB_BUCKET_ID, returns the party and presence after the bot is connected. - To run the process yourself, pass the category id to the Node.js SDK or to
CATEGORIESin self-hosting. GET /shards then shows that cluster.
What you can build
- Change cosmetics and run other bot commands through POST /bots/{botId}/commands/run.
- List and edit bots, categories, and presets from the API reference.
- Read live party and presence state from the gateway.
- Run the bots yourself with the Node.js SDK, the SDK guides, or the self-hosting cluster.
Start here
- Applications
Create an OAuth2 client and copy its id and secret.
- Authenticating
Send an API token or an access token on each request.
- OAuth2
Ask a user to approve your app, then exchange the code.
- API reference
Browse every API route and try one with your account.
- Gateway reference
Read connected bots, parties, and shards.
- Self-hosting
Run your own cluster against the same API.