invalid_token
Common causes:
- Mistyped or truncated token. Re-copy from your password manager and retry.
- The token was minted in a different environment (live vs test) than
the one you’re hitting. Double-check the prefix
(
scripe_sk_live_vsscripe_sk_test_). - The token was revoked very recently and the cached row was already evicted, so the request makes it past the cache and finds no live row. Mint a new key.
- (Rare) the workspace was deleted or its Clerk org binding broke. We fail closed in that case to avoid leaking row-existence signals.
OAuth access tokens (scripe_oat_*)
The same code covers four different situations on the OAuth path, and
the message / error_description says which one — read it rather
than the code, because the repairs differ:
Two neighbours are deliberately not
invalid_token, because
re-authorizing cannot fix either: a consent the user revoked answers
consent_required, and a
Scripe-Workspace-Id header naming a workspace the user is not a member
of answers 400 workspace_unavailable.