Authorization header of each request. The format differs between v0 and v1. Applications that act on behalf of other users authenticate with OAuth access tokens instead.
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
1
Open your project's dashboard
Navigate to your project’s page on Top.gg and open the dashboard. For v0, go directly to:For v1, open the Integrations & API settings section of your project page.
2
Copy your token
Locate the API token displayed in the Integrations & API section and copy it. This is the token you will use to authenticate your requests.
Authenticate v1 requests
Pass your token as a Bearer token in theAuthorization header:
Authenticate with OAuth access tokens
If your application works with projects owned by other users, let them authorize it through OAuth instead of asking for their project tokens. The access token you receive is passed the same way as a v1 project token, and the project is addressed by ID instead of@me:
Authenticate v0 requests
Pass your token directly in theAuthorization header without the Bearer prefix:
Error responses
The v1 API returns errors in the RFC 7807application/problem+json format. Every error response includes a structured body describing the problem:
type field identifying the error class, a human-readable title, the HTTP status code, and a detail message explaining the specific issue.