> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Gateway Unauthorized • AI Agent SDK

> GatewayUnauthorized: Raised when a caller lacks the scope a gateway method requires.

# GatewayUnauthorized

> Defined in the [**protocols**](../modules/protocols) module.

<Badge color="blue">AI Agent</Badge>

Raised when a caller lacks the scope a gateway method requires.

Carries the `method` and the `required` scope so the dispatcher can
render a structured, machine-readable denial (matching today's
`insufficient scope` envelope) without re-deriving either.

## Constructor

<ParamField query="method" type="str" required={true}>
  No description available.
</ParamField>

<ParamField query="required" type="OperatorScope" required={true}>
  No description available.
</ParamField>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/gateway/protocols.py#L7284">
  `praisonaiagents/gateway/protocols.py` at line 7284
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Gateway Feature" icon="tower-broadcast" href="/docs/docs/features/gateway" />
</CardGroup>
