> ## 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.

# Authorize Method • AI Agent SDK

> authorize_method: Central, default-deny authorisation gate for a gateway method.

# authorize\_method

Function

> This function is defined in the [**protocols**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/protocols.md) module.

Central, default-deny authorisation gate for a gateway method.

Resolves the required scope from the single source of truth
(:func:`resolve_required_scope`) — so an unclassified/plugin-registered
method is `ADMIN`-only by omission rather than reachable ungated — and
raises :class:`GatewayUnauthorized` when `client_scopes` do not satisfy
it. Dispatch calls this once, centrally, instead of scattering per-endpoint
checks that can drift from the registry.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def authorize_method(method: str, client_scopes: 'Set[OperatorScope]', params: Optional[Dict[str, Any]]) -> None
```

## Parameters

**method** `str` *required*

No description available.

**client\_scopes** `'Set[OperatorScope]'` *required*

No description available.

**params** `Optional`

No description available.

## Uses

* `resolve_required_scope`
* `GatewayUnauthorized`

## Source

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


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