Skip to content
alltcgapi.com

Docs

Authentication

One key, sent as a header, for every game.

Send your key on every request to a non-public route, in either of two headers.

X-Api-Key: atcg_live_…
Authorization: Bearer atcg_live_…

A key starts with atcg_live_ and is shown once, when it is issued. Only a keyed hash of it is stored, so a lost key cannot be recovered: it is replaced.

Keys and accounts

Credits and rate limits belong to the account, not to the key. Several keys on one account share one allowance, so a key per environment costs nothing extra.

Manage keys

Create, rotate and revoke keys from your account page, or with the /v1/me/keys routes. Rotating gives a key a new secret and keeps the old one working for a short grace period, so you can switch without downtime.

Never in a browser

A key in client-side code is a key anyone can copy. Call the API from your server and send your own response to the browser.

Check a key

Request
curl "https://api.alltcgapi.com/v1/me" -H "X-Api-Key: $ALLTCG_KEY"

/v1/me costs no credits and returns your plan, your scopes and what is left.

NextPrices