approve • AI Agent SDK

approve: Approve a pairing code, authorizing the channel.

approve

Method

</div>

This is a method of the PairingProtocol class in the protocols module.

Approve a pairing code, authorizing the channel.

Signature

python
def approve(channel_type: str, code: str, user_id: str, user_name: str) -> bool

Parameters

ParamField str

Type of channel

ParamField str

The pairing code to approve

ParamField str

User identifier (optional, defaults to empty string)

ParamField str

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

Returns

ResponseField bool

True if approval successful, False if code invalid/expired

Source

View on GitHub

praisonaiagents/gateway/protocols.py at line 3081