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

# approve • AI Agent SDK

> approve: Approve a pairing code, authorizing the channel.

# approve

Method

> This is a method of the [**PairingProtocol**](https://praison.ai/docs/sdk/reference/praisonaiagents/classes/PairingProtocol.md) class in the [**protocols**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/protocols.md) module.

Approve a pairing code, authorizing the channel.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def approve(channel_type: str, code: str, user_id: str, user_name: str) -> bool
```

## Parameters

**channel\_type** `str` *required*

Type of channel

**code** `str` *required*

The pairing code to approve

**user\_id** `str` (default: '')

User identifier (optional, defaults to empty string)

**user\_name** `str` (default: '')

Human-readable username (optional, defaults to empty string)

### Returns

**Returns** `bool`

True if approval successful, False if code invalid/expired

## Source

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


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