docs/users/features/channels/weixin.md
This guide covers setting up a Qwen Code channel on WeChat via the official iLink Bot API.
WeChat uses QR code authentication instead of a static bot token. Run the login command:
qwen channel configure-weixin
This will display a QR code URL. Scan it with your WeChat mobile app to authenticate. Your credentials are saved to ~/.qwen/channels/weixin/account.json.
Add the channel to ~/.qwen/settings.json:
{
"channels": {
"my-weixin": {
"type": "weixin",
"senderPolicy": "pairing",
"allowedUsers": [],
"sessionScope": "user",
"cwd": "/path/to/your/project",
"model": "qwen3.5-plus",
"instructions": "You are a concise coding assistant responding via WeChat. Keep responses under 500 characters. Use plain text only."
}
}
}
Note: WeChat channels do not use a token field — credentials come from the QR login step.
# Start only the WeChat channel
qwen channel start my-weixin
# Or start all configured channels together
qwen channel start
Open WeChat and send a message to the bot. You should see a typing indicator ("...") while the agent processes, followed by the response.
You can send photos and documents to the bot, not just text.
Photos: Send an image (screenshot, photo, etc.) and the agent will analyze it using its vision capabilities. This requires a multimodal model — add "model": "qwen3.5-plus" (or another vision-capable model) to your channel config. A typing indicator shows while the image is being downloaded and processed.
Files: Send a PDF, code file, or any document. The bot downloads and decrypts it from WeChat's CDN, saves it locally, and the agent reads it with its file tools. This works with any model.
WeChat channels support all the standard channel options (see Channel Overview), plus:
| Option | Description |
|---|---|
baseUrl | Override the iLink Bot API base URL (default: https://ilinkai.weixin.qq.com) |
qwen channel configure-weixin to log in again.senderPolicy: "pairing" or "allowlist" to control who can talk to the bot. See DM Pairing for details.Run qwen channel configure-weixin to log in via QR code first.
Your WeChat login session has expired. Stop the channel and run qwen channel configure-weixin again.
qwen channel start my-weixin)senderPolicy: "allowlist", make sure your WeChat user ID is in allowedUsersmodel that supports vision (e.g., qwen3.5-plus)