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

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.