← All frames
Frame (e) · route /settings/tokens

States

Every state a consumer must render is contract, not decoration. Loading, the no-tokens invitation, a load failure, and the authorization denial that must never become a sign-in prompt.

(e1) Loading

Tokens

Loading…

(e2) No tokens yet

Tokens

0 in Northwind

No service tokens yet

Create a token to let a service, CI job, or script call the API for Northwind. You choose exactly what it can do, and you'll see the secret once.

(e3) Couldn't load

Tokens

(e4) Not allowed — 403, never a sign-in redirect

Tokens

Contract. Loading covers the in-flight GET /api/organizations/{orgId}/tokens. Empty is the first-run state — a new org has no tokens, and the invitation is to create one. Error covers a non-2xx list response with data-action="retry".

⚠ (e4) is the rule this frame exists to enforce. A 403 is an authorization denial, NOT an authentication failure. The caller is signed in and their session is valid; they simply lack the role to manage tokens. Render the denial in place — never redirect to sign-in. Only a 401 (no/expired session) triggers re-authentication. Bouncing a permission-denied user to a login page they'll pass straight through is the exact failure this state is contract for.

Review · api-tokens approve or reject each flow ↓
service-tokenspendingApproveReject