Base URL
All v1 API requests are made to the following base URL:Authentication
Authenticate every request by passing your Top.gg token as a Bearer token in theAuthorization header. You can find your token in your project’s Integrations & API settings on Top.gg.
Project routes and @me
Project endpoints are addressed by Top.gg project ID, for example GET /projects/:project_id/votes. Which form you use depends on your credential:
- With an OAuth access token or an application token, always pass the explicit project ID of a project the credential covers.
- With a project token, use
@mein place of:project_id. The token itself identifies the project, and it only works with@me.
Error handling
Error responses from the v1 API follow RFC 7807 and use theapplication/problem+json content type. Every error response includes the following fields:
status field to determine how to handle errors programmatically, and the detail field to surface a meaningful message when debugging.