token_revoked: The browser token is revoked or unknown here

The token was revoked by the app, or it is not known on this deployment. A top-up link also answers this code when its top-up session is no longer valid (the top-up is gone, or now belongs to another token). Widget routes, budget links, the portal and the top-up page all answer this code.

What to do

On the wire

HTTP 401, error type authentication_error. The widget routes always answer JSON; the budget link, portal and top-up pages answer a short HTML page naming the code, or JSON to a client that sends Accept: application/json (and not text/html). The body depends on who answers.

A single-tenant (self-hosted) core answers as below. Behind the multi-tenant front door, the account's core gives the same answer when it finds the token revoked or unknown. The message is the token was revoked for a revoked token, the token is not valid on this deployment for an unknown one, and the top-up session is no longer valid for a stale top-up link:

{
  "error": "unauthorized",
  "errorDetail": {
    "type": "authentication_error",
    "code": "token_revoked",
    "message": "the token was revoked",
    "param": null,
    "doc_url": "…/developers/widgets.md#token-revoked",
    "fix": "the token was revoked or is unknown here; the app mints a new one"
  }
}

The top-up page points doc_url at the top-up guide instead.

The multi-tenant hosted front door first looks up which account minted the token. A token it cannot place (unknown on this deployment, or minted by another one) is answered there, the same way for every account, so the answer reveals nothing about other accounts:

{
  "error": "token_revoked",
  "errorDetail": {
    "type": "authentication_error",
    "code": "token_revoked",
    "message": "the token is not valid on this deployment",
    "param": null,
    "doc_url": "…/errors/token_revoked.md",
    "fix": "the link or widget token is not valid on this deployment; ask the service for a new one"
  }
}

See all error codes.