FNLB Devs

Developer Portal

API

Rate Limits

The API and the gateway limit requests per IP address. They do not share a counter. Hitting a limit on one does not block the other. A limited call returns 429 and this body:

{
  "type": "error",
  "errors": [
    {
      "type": "general",
      "errorCode": "net.fnlb.errors.common.rate_limit_exceeded",
      "message": "You are being rate limited."
    }
  ]
}

Wait for the window to pass, then retry. Spread calls out instead of sending a burst and backing off every time.

API

https://api.fnlb.net/v1 has no global limit. Each route has its own window. Most routes allow about 100 requests per 10 minutes from one IP. A few are different on purpose:

RouteAPI token or sessionOAuth2 access tokenWindow
GET /bots, POST /bots10010010 minutes
Categories and presets100100010 minutes
POST /bots/{botId}/commands/run250100010 minutes
Friends, blocked users, user search250100010 minutes
GET /user50010005 minutes
POST /oauth2/token100010005 minutes
POST /bots/bulk-export2510 minutes
POST /bots/bulk-import105010 minutes

Where the OAuth2 column is higher, a token that starts with FNLBOA2AT_ gets that higher cap. An API token that starts with FNLB_ gets the lower one. Public routes, such as GET /bots/public, are not rate limited. The numbers above match the routes as they are enforced today. If you are building a client, treat 429 as the source of truth and keep the rest of your calls going. One busy route does not lock the account out of the others.

Gateway

https://gateway.fnlb.net/v1 has both a global limit and a per-route limit.

  • Global: 100 requests per 10 seconds per IP, across every gateway route.
  • Bots: GET /bots and GET /bots/{botId} share 100 requests per minute.
  • Shards: GET /shards allows 100 requests per minute.

A poller that asks for bots and shards together should stay under both. Once every 10 to 30 seconds is enough for a dashboard. The lists only include bots that are connected, so polling faster does not reveal offline bots.

Retry

async function fetchWithRetry(url, options, retries = 3) {
  for (let attempt = 0; attempt < retries; attempt++) {
    const response = await fetch(url, options);
    if (response.status !== 429) return response;
    await new Promise((resolve) => setTimeout(resolve, 10_000));
  }
  throw new Error('Rate limit exceeded after multiple retries.');
}

Queue work in your process so a loop cannot fire hundreds of command calls at once. For a higher cap on a specific integration, write to [email protected] and describe the routes and the volume.

  • Join Discord

    Ask about a limit you are hitting, or about an integration that needs more room.