> ## 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**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/protocols.md) module.

AI Agent

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

**method** `str` *required*

No description available.

**required** `OperatorScope` *required*

No description available.

## Source

> **[View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/gateway/protocols.py#L7715)**
>
> `praisonaiagents/gateway/protocols.py` at line 7715

***

## Related Documentation

> **[Gateway Feature](https://praison.ai/docs/docs/features/gateway)**


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.