Credentials. The QR flow returns live QQ Bot credentials, so the saved config must be stored in a secret store with restricted access.
Who it is forA developer setting up a QQ Bot for a project who wants to avoid copying secrets manually.
The problemCopying AppID and AppSecret from a console is error-prone and exposes secrets in more places than needed.
The outcomeA QQ channel config built from QR-confirmed credentials, ready to attach to a ChannelManager.
What you need first
- Python 3.12+
- Credentials for each platform you connect, such as a Telegram bot token, Feishu app ID and secret, or a Discord bot token
- Access to the developer portal of each platform you use
- A processor function that reads InboundMessage and yields MessageEvent objects
Steps
- Run
pip install octop-gatewayin a Python 3.12+ environment. - Call QQBotQRLogin(source="octop") and then fetch_qr_code() to get a qrcode_url.
- Render the qrcode_url as a QR code in your UI or terminal and wait for confirmation with wait_for_login(qr.task_id).
- If result.connected is true, build the config with QQConfig.from_qr_credentials(result.credentials[0]).
- Store the returned channel config yourself, since the README says persistence is the caller's responsibility.
Prompt for your agent
In the TencentCloud/octop-gateway repo, run the QQ Bot QR binding flow with QQBotQRLogin, print the qrcode_url for <user>, and wait for confirmation. Expected output: a QQConfig object built from result.credentials[0] and saved to <config store>. Verify that result.connected is true before building the config.
Caveat. The one-time decryption key is kept only in memory and discarded after success, expiry, cancellation, or timeout, so a failed run means restarting the QR flow.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for TencentCloud/octop-gateway and "Create QQ Bot credentials by scanning a QR code"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer