Sending the token
Send the token in theAuthorization header, always over HTTPS:
?project= parameter is ignored.
Scopes
A token always has
read, and optionally write. In CI that only fetches, use a token with only read.
Error codes
Rate limit
Two limits apply:- Per token: 120 requests per minute. Every response has the headers
X-RateLimit-LimitandX-RateLimit-Remaining. - Per IP address: 600 requests per minute, counted before the token is checked, so also for requests with an invalid token. That is five tokens at full speed behind one address, for example a CI runner behind NAT.
429 with Retry-After (seconds), as JSON.
Storing tokens
- Locally in
.envasTOLK_TOKEN, never in git. - In GitHub as the repository or organization secret
TOLK_TOKEN. - A token starts with
tolk_, so secret scanning recognizes it if it ends up somewhere anyway.