Generate Code • AI Agent SDK

generate_code: Generate a new pairing code for a channel.

generate_code

Method

</div>

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

Generate a new pairing code for a channel.

Signature

python
def generate_code(channel_type: str, channel_id: Optional[str]) -> str

Parameters

ParamField str

Type of channel (e.g., “telegram”, “slack”, “ui”)

ParamField Optional[str]

Optional channel identifier

Returns

ResponseField str

The generated pairing code

Source

View on GitHub

praisonaiagents/gateway/protocols.py at line 3065


Related Documentation