Statbot API
This API is currently experimental and may change at any time without notice. It is provided as-is, and breaking changes may occur as development continues. Use in production environments is not recommended unless you are prepared to handle potential disruptions.
Introduction
This API is available to guilds with all Statbot Premium upgrades. It allows developers to access most of the statistical data that Statbot has collected for a given guild.
Access
Access to the API requires authentication via an API key. You can generate a key from your guild's Statbot dashboard under: Server Settings > Developers > API Key
All Statbot Premium upgrades must be active to generate and use an API key. If a guild loses access to any required upgrade, API requests will be blocked until the missing upgrade(s) are restored.
Authentication uses the standard Bearer HTTP Authorization scheme. Include the token in the header of each request as: Authorization: Bearer <api_key>
. Requests without a valid token will be rejected.
API keys are tied to individual guilds. They cannot be used to access data from other guilds. Requests with mismatched API keys and guild IDs will be denied.
Expectations
Statbot builds on top of Discord's API, so developers are expected to retrieve information such as roles and permissions from Discord. Terms like guild
are used consistently with Discord's terminology.
While the Statbot support team may offer basic guidance on how to use the Discord API, it is ultimately the developer's responsibility to retrieve Discord-specific data.
One small exception is channel data. Since Statbot preserves historical channel data that Discord does not, this API allows you to fetch both current and past channels. However, for all other Discord resources, the Discord API remains the preferred and most reliable source. Statbot does not guarantee the real-time accuracy of the data it provides.
Rate Limiting
The API uses rate limiting to prevent abuse. These rate limits are subject to change. Your applications should parse and handle the Rate Limit Headers to avoid disruption.
Support
For help or questions about the API, join the Statbot Support Server and ask in: 📈 Statbot Support > #💻-api-support
Authentication
- HTTP: Bearer Auth
Security Scheme Type: | http |
---|---|
HTTP Authorization Scheme: | bearer |