Skip to main content

API keys

Every request must carry an API key. Two header forms are accepted:
Keys look like thn_{env}_{32 characters} where env is live or test. Only the first 12 characters are ever shown again in the admin UI — copy the full key when it is created.
Treat keys as passwords. Never put them in client-side code, public repositories or logs. Revoke and re-create a key if it may have leaked.

Scopes

A key only holds the scopes chosen when it was created. Write scopes do not imply read scopes — pick both if you need both. A request with a key that lacks a required scope returns 403 insufficient_scope with details.required listing what is needed. Drive creation and uploads require drive:write and the key owner’s Drive permissions. Existing read/download keys do not gain write access automatically. See Create a Drive Document for content creation and Start a Drive Upload for prepared files.

Chapter scope

Keys are created for one chapter, or association-wide by a root-chapter admin. See Chapters for how chapter_id is interpreted for each kind of key.

Expiry and revocation

Keys may be given an expiry date at creation. An admin can revoke a key at any time; revoked or expired keys receive 401 unauthorized immediately.

Example