Authorization header only. A token in a query string is ignored, answers 401, and is never repeated in the error body.
Two credential types
Both carry the same entitlement checks. A token can be narrower than a session: it carries a scope and an optional expiry, and a read only token is refused with
403 the moment it tries to change anything. Give each consumer its own token and revoke individually. A token cannot create or revoke tokens, change the password, schedule workspace deletion or manage the team; those routes need a session. See Personal API tokens.
Scope and expiry
Read only is the right default for anything agentic. The MCP server lists the tools that change things only to a token with the write scope, so give an agent a read token unless it has to change something. An expired token fails authentication with
401 exactly like a revoked one.
Called with a token, GET /auth/me also reports the token’s scope as tokenScope. A browser session has no scope, so the field is absent.
Rate limits count per workspace rather than per token, so minting a second token buys no extra capacity. See Rate limits and quotas.
Status codes you will see
A
401 after a deployment usually means AUTH_SECRET was rotated, which invalidates sessions. Personal API tokens survive a rotation, because they are stored as hashes rather than signed. See Rotate secrets.
Keep the token out of your history
Read it from an environment variable rather than typing it into a shell.Related
Error responses
The envelope every failure returns.
Authentication and accounts
Sessions, guards and entitlements.