Authorization header of each request. The format differs between v0 and v1.
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 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.