owner_token_refused: Browser surfaces never accept the owner token
A widget route under /widgets/v1/ was called with the deployment's owner token as its Bearer token. The owner token controls the whole deployment, so the widget routes refuse it outright and never run the request. They take only a short-lived widget token minted by the app's server. A call from an origin that may not use the widget routes is refused first with widget_origin_refused.
On the multi-tenant hosted tier the front door checks the token's shape first: an owner token or an API key is not a browser token, so it answers token_malformed instead. A single-tenant core also answers an API key or any other value that is neither the owner token nor a browser token with token_malformed.
What to do
- Never put the owner token in a web page. Mint a widget token on your server (
POST /owner/v1/widget-tokenswithbudgetIdandscope) and pass that to the page. - See widgets.
On the wire
HTTP 401, error type authentication_error.
{
"error": "unauthorized",
"errorDetail": {
"type": "authentication_error",
"code": "owner_token_refused",
"message": "the owner token is never accepted on a browser surface (fail closed)",
"param": null,
"doc_url": "…/developers/widgets.md#owner-token-refused",
"fix": "browser surfaces never accept the owner token; mint a scoped token server-side"
}
}
See all error codes.