Sonny Labs Docs
Error codes

auth.forbidden_scope

The credential is valid but does not carry the scope this operation requires.

auth.forbidden_scope is returned at HTTP 403.

When this fires

API keys are scoped (scans:write, policies:read, etc.). Sessions inherit scopes from the user's role. When the granted scope set does not include every scope the operation requires, the request is rejected before it reaches the handler.

What to do

Mint a new API key whose scopes include the missing one, or ask an admin to grant your user the role that carries it. The required scopes for each endpoint are listed in the REST API reference.

See also

  • SDK reference — the Python and TypeScript SDKs raise typed exceptions for codes in this namespace.
  • Error code index — every code the runtime can return.

On this page