Authenticate with the FBL API
Learn how to obtain your FBL API token from the dashboard, pass it in the Authorization header, and handle authentication errors.
Every request to the FBL API requires authentication via a token. You obtain this token from your bot's dashboard settings and include it in the Authorization header of each request.
Keep your API token secret. Do not commit it to source control or expose it in client-side code. Use environment variables to manage it securely.
Get your API token
Open your bot's dashboard
https://fbl.gg/bots/:yourbotid/edit/api
Generate your token
Authenticate requests
Pass your token directly in the Authorization header without the Bearer prefix:
Authorization: your-fbl-token-here
For example, using curl:
curl https://fbl.gg/api/v1/bots/:botid \
-H "Authorization: your-fbl-token-here"
Error responses
The FBL API returns errors in the RFC 7807 application/problem+json format. Every error response includes a structured body describing the problem:
type ProblemDetails = {
type: string;
title: string;
status: HTTPStatusCode;
detail: string;
};
A 401 Unauthorized response, for example, will include a type field identifying the error class, a human-readable title, the HTTP status code, and a detail message explaining the specific issue.