scope_insufficient: The widget token cannot approve or reject
A widget called POST /widgets/v1/approvals/{id}/approve or POST /widgets/v1/approvals/{id}/reject with a widget token minted with scope: "read". A read-scoped token shows the balance, receipts, tree and approvals; only an approve-scoped token can decide an approval. Nothing was decided.
The multi-tenant hosted tier answers the same way: the front door passes the request to the account's core, which checks the scope.
What to do
- Mint the widget token with
scope: "approve"(POST /owner/v1/widget-tokens) for the people who may decide approvals. - The approvals list answers
canDecide: falsefor a read-scoped token; use it to hide the buttons. - See widgets.
On the wire
HTTP 403, error type authentication_error.
{
"error": "unauthorized",
"errorDetail": {
"type": "authentication_error",
"code": "scope_insufficient",
"message": "this token is read-scoped",
"param": null,
"doc_url": "…/developers/widgets.md#scope-insufficient",
"fix": "this action needs an approval-scoped token"
}
}
See all error codes.