WeChat, QQ, and Yuanbao: Tencent Ecosystem Channel Integration
💡 One-sentence summary: use OpenClaw to bring your AI assistant into Tencent chat tools — WeChat QR-code private chats, an official QQ Bot in groups, and a direct Yuanbao appKey connection.
Lesson 3 of the office track. The previous two lessons set up WeCom and Feishu; this lesson covers OpenClaw connecting to WeChat, QQ, and Yuanbao — completing the remaining Tencent ecosystem channels. OpenClaw WeChat integration relies on the external plugin openclaw-weixin maintained by the Tencent WeChat team, and works with a personal WeChat QR-code scan; QQ uses the official open-platform bot (@tencent-connect/openclaw-qqbot); Yuanbao is maintained by the Tencent Yuanbao team and connects over WebSocket. All three channels share one Gateway without interfering with each other. All examples are based on OpenClaw v2026.10.9.
What you can do after this lesson
- Log in by scanning a QR code with WeChat on your phone and connect the AI assistant to personal WeChat private chats — text, images, and other media are handled directly, with no need to register an official account
- Create a QQ bot on q.qq.com and connect it to OpenClaw with a single command: C2C private chats + group mentions, with images/voice/video/files all supported
- Configure the Yuanbao Bot with
appKey:appSecret, so both Yuanbao private chats and group chats have someone on duty - Choose the right tightening method per channel: QQ whitelists, Yuanbao pairing codes, WeChat QR-code self-use
Why use OpenClaw instead of a web-based AI?
| Capability | Web-based AI | OpenClaw + Tencent ecosystem plugins |
|---|---|---|
| Where it appears | ❌ A separate web page, unusable inside chat tools | ✅ Just talk to it in WeChat private chats, QQ, or Yuanbao |
| Personal WeChat | ❌ Can't get into WeChat, only copy and paste | ✅ openclaw-weixin QR-code login, chat directly inside WeChat |
| QQ groups | ❌ Not present in groups | ✅ Official QQ Bot API, responds to group mentions, handles all rich media |
| Reaches out to you proactively | ❌ You have to ask it first | ✅ Scheduled tasks push morning briefs into QQ / Yuanbao sessions |
| Data and models | ❌ All conversations sit with the service provider | ✅ Gateway runs on your own machine, swap models freely (including domestic models) |
Your current predicament
- WeChat is a national tool, but web-based AI can't get in — every time you have to switch away, copy, paste, then copy back
- You want an AI on duty in a QQ group, but everything you find is third-party bots of unknown origin, and you dare not hand your chat history to them
- You created a Bot in Yuanbao and want it connected to your own OpenClaw capabilities: memory, skills, and the full automation suite
When to use this technique
When you need:
- AI present in personal WeChat private chats, ask casually from your phone — it's there where your family and friends are
- A mentionable bot in your QQ group that answers group members' questions
- The Bot in Yuanbao backed by your chosen models and the full OpenClaw workflow
And you don't want:
- Switching to a browser and copying and pasting every time
- Entrusting your chat history to third-party bots of unknown origin
- Writing WeChat or QQ protocol integrations from scratch yourself
🎒 Preparation before starting
- Completed Hands-On Scenarios: Choose Your Track: Gateway is running, with at least one model connected
openclaw --versionshows 2026.5.12 or later (the requirement declared by the WeChat plugin 2.4.8; the Yuanbao channel requires 2026.4.10+; this tutorial's baseline v2026.10.9 satisfies it)- A phone with WeChat installed (for QR-code login); to connect QQ, prepare a QQ account that can log in to the QQ Open Platform; to connect Yuanbao, be able to create a Bot in the Yuanbao app
- a cup of water ☕—15 minutes later, pick any of three Tencent channels
Follow along with me
Step 1: Install the OpenClaw WeChat plugin (openclaw-weixin)
Why: The WeChat channel is not part of the OpenClaw core; it is an external plugin maintained by Tencent's WeChat team. The channel id is openclaw-weixin (weixin and wechat are aliases), and both CLI commands and config paths use this name.
Option A: one-shot install via the official CLI (recommended):
npx -y @tencent-weixin/openclaw-weixin-cli installOption B: install the plugin package manually:
openclaw plugins install "@tencent-weixin/openclaw-weixin"
openclaw plugins enable openclaw-weixinYou should see: installation completes without errors, and openclaw-weixin appears in openclaw plugins list. Plugin commands apply to the running Gateway—if the Gateway is offline, start it first.
💡 Check version compatibility at a glance
Plugin 2.4.8 (npm latest) declares a requirement of OpenClaw 2026.5.12 or above; older versions of OpenClaw between 2026.1.0 and 2026.3.22 need the legacy line: openclaw plugins install @tencent-weixin/openclaw-weixin@legacy. If the plugin reports the version is too old, first run openclaw update.
openclaw plugins listshows openclaw-weixin
Step 2: Scan the QR code to log in to your personal WeChat
Why: The WeChat plugin uses QR-code login—no need to register an official account or an enterprise account; a quick scan with your personal WeChat and you're connected. Account tokens are stored locally under ~/.openclaw.
Run this on the same machine where the Gateway runs:
openclaw channels login --channel openclaw-weixinScan the QR code with WeChat on your phone and confirm the login. You should see: after a successful scan, the token is saved locally; when the Gateway starts, the plugin launches a WeChat listener for each logged-in account.
Then open WeChat, send "hello" to this account in a direct chat—when a reply comes back, the pipeline is working.
💡 This is the unique value of OpenClaw
A web-based AI can never get into your WeChat; this Claw moves into your direct chats with a single scan, handling text, images, and other media messages directly, backed by your own chosen model and full skill set.
⚠️ WeChat supports direct chats only
The plugin's capability declaration is direct chats only—direct chats and media work, but group chats are not supported. Don't add it to a group to test; it won't speak. For group chats, use QQ or Yuanbao, or revisit the WeCom/Feishu lessons.
⚠️ Pairing for 2.4.8 is unavailable
Plugin 2.4.8 does not register a pairing adapter for OpenClaw, so the standard pairing commands cannot govern WeChat direct-chat permissions. It reads the legacy account allowlist file; if that's missing, it falls back to the identity of the person who scanned the code; if neither exists, anyone who sends a message can chat. Scanning for your own use is fine—just don't run it as a public service; if you need enforced pairing, first run openclaw plugins disable openclaw-weixin and wait for a fixed release (see the pitfalls section).
- Send a message in a WeChat direct chat and the bot replies
Step 3: Create a QQ bot and get the AppID and AppSecret
Why: The QQ channel uses the official QQ Bot API (WebSocket gateway); credentials come from the QQ Open Platform, with no third-party protocols involved.
- Open the QQ Open Platform, and register / log in by scanning the QR code with QQ on your phone
- Click Create Bot
- On the bot settings page, copy the AppID and AppSecret
You should see: on the settings page, both the AppID and AppSecret can be copied correctly, and the AppSecret is saved in your password manager.
⚠️ The AppSecret cannot be recovered once you leave the page
The official docs explicitly warn: save the AppSecret before leaving the Open Platform page, otherwise it can only be regenerated.
Step 4: Hook the QQ bot into OpenClaw
Why: QQ is an officially downloadable plugin (@tencent-connect/openclaw-qqbot); channels add writes the credentials with a single command, and the config takes effect hot.
openclaw plugins install @tencent-connect/openclaw-qqbot
openclaw channels add --channel qqbot --token "<AppID>:<AppSecret>"Don't want to type credentials by hand? openclaw channels add runs an interactive wizard and also supports binding by scanning a QR code with QQ on your phone.
The corresponding config looks like this (channels add writes it for you; shown here for reference):
{
channels: {
qqbot: {
enabled: true,
dmPolicy: "open",
allowFrom: ["openclaw:approval-disabled"],
appId: "<你的AppID>",
clientSecret: "<你的AppSecret>",
},
},
}The openclaw:approval-disabled in allowFrom is the marker for "disabling native approval actions"; to enable approval buttons, replace it with the approver's QQ openid. Credentials can also go through the environment variables QQBOT_APP_ID / QQBOT_CLIENT_SECRET (default account only); clientSecret also supports SecretRef references to avoid plaintext in config files.
Verify:
openclaw channels status --probeYou should see: the qqbot channel online. In QQ, message the bot directly (C2C) with "hello" and it replies; add it to a group and @ it, and it replies too.
💡 Get your own openid
Send /bot-me in a direct chat, and the bot will reply with your QQ user openid—that's what you'll use for the allowlist in step 6. Note that each bot's openid is independent: Bot A's openid cannot be used with Bot B.
openclaw channels status --probeshows qqbot online- Both QQ direct chats and group @ mentions wake the bot
Step 5: Connect Tencent Yuanbao
Why: Yuanbao is Tencent's AI assistant platform; the openclaw-plugin-yuanbao, maintained by the Yuanbao team, connects over WebSocket and supports both direct chats and group chats. It requires OpenClaw 2026.4.10+ (this tutorial's baseline v2026.10.9 satisfies it).
First create a bot in the Yuanbao app's application settings and get the appKey and appSecret, then:
openclaw channels add --channel yuanbao --token "<appKey>:<appSecret>"Interactive works too: openclaw channels login --channel yuanbao, and enter the App Key and App Secret as prompted.
You should see: openclaw channels status --probe shows yuanbao online; direct chats with the bot in Yuanbao get replies; in groups it only replies when you @ it—the default is requireMention: true, and replying to its message counts as an implicit @.
💡 The Yuanbao plugin's source of truth
The official docs state: the Yuanbao plugin's configuration and behavior details come from the plugin's own documentation and have not been verified against the OpenClaw core source code. If behaviors differ, defer to the official Yuanbao channel documentation.
- Yuanbao direct chats get replies; group @ mentions get replies
Step 6: Tighten access control
Why: The default policy leans open—QQ's dmPolicy defaults to open when allowFrom has no specific entries, and Yuanbao's dm.policy also defaults to open. Trying it out yourself is fine, but once outsiders can reach your account, tighten things first.
QQ: write the openid obtained via /bot-me into the allowlist:
{
channels: {
qqbot: {
dmPolicy: "allowlist",
allowFrom: ["<你的openid>"],
groupPolicy: "allowlist",
groupAllowFrom: ["<群openid>"],
},
},
}Yuanbao: dm.policy has four levels: open / pairing / allowlist / disabled:
{
channels: {
yuanbao: {
dm: {
policy: "allowlist",
allowFrom: ["<用户ID>"],
},
},
},
}If you want to keep things simple, use pairing: new people who DM you will receive a pairing code, which you approve in the CLI:
openclaw pairing list yuanbao
openclaw pairing approve yuanbao <CODE>WeChat: 2.4.8 has no usable pairing mechanism (see the warning in step 2) — it relies on the fact that "only the person who scanned the QR code uses it" as a fallback, so don't lend the account to public scenarios.
You should see: the bot no longer replies to people outside the whitelist, whether in DMs or in group chats.
For the complete access-control system, see Security Hardening (Part 1): Access Control and Identity.
📋 Magic Prompts
Paste the following prompts directly into the chat window of the corresponding channel and send them to your AI assistant.
📝 WeChat Stenographer
Expected result: drop a meeting transcript or stream-of-consciousness notes into a WeChat DM, and get back a structured note that's ready to use.
## Role
You are my personal stenographer, skilled at turning a pile of spoken, informal words into clear notes.
## Task
Organize the following material into shorthand notes and send them to me.
## Input
### Required
- Material: [paste the meeting transcript, voice script, or quick thoughts here]
### Optional
- Purpose: [What will this note be used for later? E.g., writing a weekly report, preparing a retrospective?]
## Output Requirements
Divide it into three sections: "Key Points / To-Dos / Uncertain"; to-dos should include an owner and a deadline whenever possible.
## Constraints
- ✅ Keep the specific numbers, names, and times from the material
- ✅ Put anything you don't understand or are unsure about into "Uncertain" — don't guess
- ❌ Do not add conclusions that aren't in the material⏳ Daily Morning Report to QQ DM
Expected result: the AI uses its built-in scheduler to create a scheduled task that automatically sends an AI-field morning report to your QQ DM every weekday morning — just say it once in the conversation and it's set up.
Create a scheduled task: every weekday morning at 8:30, send me an AI-field morning report.
Requirements:
- Pick the 5 most important AI news items from yesterday, each with a one-sentence summary and a link to the original article
- End with one sentence about one thing worth doing today
- Deliver it to my QQ DM⚠️ Proactive messages all have thresholds
QQ may block messages proactively initiated by the bot — if you haven't interacted with it recently. WeChat is stricter: outbound messages must carry a context token delivered with the other party's inbound message; if it has never received a message from you, the plugin will simply refuse to send (see Advanced Tips for details). If the morning report occasionally doesn't arrive, send the bot a DM first and then observe. For the full guide to scheduled tasks, see Automations Scheduled Tasks.
✅ QQ Group Discussion Converger
Expected result: for a flooded group discussion, @ the bot with this instruction and compress it into three actionable conclusions — no need to scroll back through the chat.
## Role
You are the discussion moderator, skilled at compressing flooded group chats into clear conclusions.
## Task
Converge the following group chat log into a summary and send it back to this group.
## Input
### Required
- Log: [paste the group chat log or meeting transcript]
### Optional
- Context: [What is the premise of this discussion?]
## Output Requirements
Output in three sections: "Conclusions / To-Dos / Open Questions"; to-dos in a table: Item | Owner | Deadline.
## Constraints
- ✅ Assign each to-do to a specific person
- ✅ Put undecided items into "Open Questions"
- ❌ Do not repeat the chat log sentence by sentenceCheckpoint ✅
openclaw plugins listshowsopenclaw-weixin;openclaw channels status --probeshows the configured channels online- WeChat DMs get replies (group chats are not supported — don't test in a group)
- Both QQ DMs and group @s can invoke the bot;
/bot-meretrieved your openid - Yuanbao replies in DMs; in groups it only replies when @-mentioned (default behavior)
- You've thought through the access policy for all three channels: tightened what needed tightening, or explicitly decided to keep them open
Pitfall Warnings
❌ Added the bot to a WeChat group and it stays silent
Cause: the WeChat plugin's capability declaration is direct chats only — only DMs and media are supported; group chats are outside its capabilities.
Correct approach: use WeChat for DMs only. For group chats, go to QQ / Yuanbao, or use WeCom/Feishu.
❌ WeChat 2.4.8 tried to manage permissions with standard pairing — it doesn't work
Cause: this version doesn't register a pairing adapter, so the standard pairing list / approval commands can't establish WeChat DM permissions. The plugin reads the legacy account allowlist file; if there is none, it falls back to the QR-code scanner's identity, and when neither exists, any sender can chat. Moreover, openclaw doctor --fix imports the legacy allowlist into SQLite and deletes the source file — people allowed in the old file may lose access as a result; and revoking in SQLite afterwards can't revoke permissions granted by the old file or the QR-code fallback.
Correct approach: don't rely on standard pairing to manage WeChat permissions. Scanning the QR code yourself for your own use is safest; for scenarios that require enforced pairing, first run openclaw plugins disable openclaw-weixin to disable the plugin and wait for a pairing-capable version to be released.
❌ Closed the page before saving the QQ AppSecret
Cause: the open platform's AppSecret can't be viewed again once you leave the page.
Correct approach: after copying the AppID / AppSecret, store them in a password manager first. If lost, regenerate them on the bot's settings page, then update clientSecret in the config with the new value.
❌ The QQ scheduled morning report never arrived
Cause: QQ may block messages proactively initiated by the bot — if the user hasn't interacted with it recently.
Correct approach: after creating the scheduled task, send the bot a DM first to stay engaged; or change "proactive push" to "I ask it at the scheduled time".
❌ @-mentioning the bot in a Yuanbao group gets no response
Follow the official troubleshooting order: ① confirm the Bot has been added to the group; ② confirm you @-mentioned it (@ is required by default; replying to its message counts as an implicit @); ③ openclaw logs --follow check the logs. If it still doesn't work, confirm the Bot has been created in the Yuanbao App and approved, and that openclaw gateway status shows the Gateway running.
❌ The Gateway keeps restarting after installing the WeChat plugin
Cause: older versions of OpenClaw have a generic stale-Gateway cleanup bug (issue #68451) — the plugin's helper process may mistakenly kill the Gateway that started it, manifesting as a restart loop under process managers like systemd; in addition, plugin 2.4.6 fails to load on OpenClaw 2026.8.1 (it references a retired SDK path).
Correct approach: update OpenClaw together with the plugin:
npm view @tencent-weixin/openclaw-weixin version
openclaw plugins install "@tencent-weixin/openclaw-weixin" --force
openclaw gateway restartAdvanced Tips (Optional)
WeChat Advanced: Multiple Accounts, Proactive Messages, and Message Behavior
Run openclaw channels login --channel openclaw-weixin again to add a second account. With multiple accounts, isolate DM sessions by "account × channel × sender" to avoid cross-talk between sessions:
openclaw config set session.dmScope per-account-channel-peerScheduled / proactive messages have a hard threshold: the WeChat backend requires every outbound message to carry a context token, which is delivered by an inbound message from the other party and stored by the plugin per account. If no message from the other party has ever been received, or the token has expired, the plugin will refuse to send rather than pretend to succeed.
So before a scheduled task pushes to WeChat, have the other party send a DM first to refresh the token; scheduled tasks in multi-account deployments must explicitly set both delivery.to and delivery.accountId — missing or ambiguous values will fail. Tokens are sensitive data: don't copy them across accounts or write them into task configs.
Message behavior can be tuned. The following fields come from the openclaw-weixin detailed guide (community distribution documentation, same upstream and same plugin ID as the official Tencent package):
| Field | Default | Description |
|---|---|---|
channels.openclaw-weixin.replyProgressMessages | true | Progress messages for tool-call TOOL_CALL_START / TOOL_CALL_RESULT; set to false if too noisy (doesn't affect the final reply) |
channels.openclaw-weixin.blockStreaming | Enable | chunked replies: send text blocks in order between multi-step tool calls (not token-by-token streaming); false send only the final reply, can be overridden individually with accounts.<账号>.blockStreaming |
channels.openclaw-weixin.botAgent | OpenClaw | UA-style self-declaration (e.g. MyBot/1.2.0), used only for background observability, not involved in authentication or routing |
⚠️ Uninstalling also deletes the configuration
Uninstalling the plugin deletes the channels.openclaw-weixin configuration—if you may reinstall later, back up ~/.openclaw/openclaw.json first. When switching between the Tencent official package and community builds, just install in place to overwrite; do not uninstall first, and the configuration and login state will be preserved. Community builds require a newer OpenClaw; if you see requires OpenClaw >=2026.6.1, run openclaw update first.
QQ multi-bot and group strategies
- Multiple accounts:
openclaw channels add --channel qqbot --account bot2 --token "<AppID2>:<Secret2>"—each account has an independent WebSocket connection and credential cache, and logs carry the account id - Default group policy:
groups["*"]sets a default for all groups (e.g.requireMention: true), and specific groups override it with their real group openid - Group command levels:
commandLevelthree levels—all(all built-in commands),safety(keep only/help/btw/stopin groups, sensitive commands move to DMs),strict(keep only session-control commands) - Group history context:
historyLimitdefaults to 50 entries; set 0 to disable
Yuanbao reply tuning
| Field | Default | Description |
|---|---|---|
channels.yuanbao.outboundQueueStrategy | merge-text | Outbound merging: batch until 2800 characters or 5 seconds idle before sending; immediate sends each segment immediately |
channels.yuanbao.maxChars | 3000 | Single-message limit; when exceeded, handled per overflowPolicy (split / stop) |
channels.yuanbao.replyToMode | first | Quote-reply policy in groups: off / first / all |
channels.yuanbao.historyLimit | 100 | Number of group-chat context entries |
channels.yuanbao.fallbackReply | I can't answer that right now—try asking me something else | Fallback message when the model returns no content; customizable |
Lesson summary
✅ You can now:
- Complete OpenClaw WeChat integration: log in by scanning the QR code, and use it directly in personal-WeChat DMs (group chats not supported)
- Get a QQ bot from creating the account on q.qq.com to standing guard with @ in groups, connected into OpenClaw with one command
- Set up Yuanbao Bot with
appKey:appSecret, covering both DMs and group chats - Choose the right lockdown method per channel: QQ allowlists, Yuanbao pairing codes, WeChat QR-code self-use
Key configuration fields recap:
| Field | Recommended value | Description |
|---|---|---|
channels.qqbot.appId / clientSecret | Open Platform credentials | also supports environment variables QQBOT_APP_ID / QQBOT_CLIENT_SECRET (default account only) |
channels.qqbot.dmPolicy / groupPolicy | allowlist | defaults to open; tighten before going live |
channels.yuanbao.appKey / appSecret | Create a Bot in the Yuanbao App to get | --token "appKey:appSecret" write it once |
channels.yuanbao.dm.policy | allowlist or pairing | defaults to open; pairing approval openclaw pairing approve yuanbao <CODE> |
channels.yuanbao.requireMention | true (default) | in groups, replies only when @-mentioned |
session.dmScope | per-account-channel-peer | isolates DM sessions across WeChat multiple accounts |
Next lesson preview
Next lesson A4 Email assistant: IMAP inbox duty. You will learn:
- How the IMAP plugin monitors the inbox and opens an isolated, restricted reader session for each allowed incoming email
- Sender gating: how to decide which incoming emails are worth waking the AI for
- Pub/Sub trigger method for Gmail users
- Security boundaries for email duty: no sending emails, no changing flags, no public webhooks
That completes the chat channels—next lesson, let the AI take over your inbox too.