Weixin / WeChat
Anyy's Weixin channel uses an interactive QR-confirmed long-polling session. It supports direct messages, inbound and outbound media, typing state, live probes, and /voice channel control.
The current connection profile is Preview. Verification-code, redirect-host, some already-bound-account, identity-refresh, and remote-lifecycle cases are not supported. Keep another Anyy surface available for recovery.
1. Start QR Authentication
Open Dashboard → Channel → Add → Weixin / WeChat. This entry uses Ilink long polling; start authentication from its account page.
Dashboard displays a QR code for the interactive step. Scan it with the intended Weixin account and confirm on the phone. The authentication step has a five-minute timeout and can be cancelled.
The returned login token is stored as a Profile credential reference; it is not shown again in normal channel configuration.
CLI and TUI setup use the same authentication flow. If you cancel after a standalone scan succeeds but before saving the account, Anyy discards the unused local login draft. Canceling does not disconnect an account that has already been saved.
2. Choose Direct-Message Access
Weixin supports open, allowlist, or disabled DM policy. The current default is open.
After QR binding, open the account settings to choose the DM policy and edit allow_from. Select allowlist when only known senders should reach Anyy. Entries use the Weixin sender identity observed by the channel. Saving these settings preserves the current login and does not request another QR code; an empty list removes all entries.
Weixin is direct-message only in the current profile; group policy is not offered.
3. Verify the Account
After the QR flow completes:
anyy channel reload
anyy channel doctor weixin
Send two direct messages from an allowed account in the same conversation. Check that each receives one reply and the second retains the conversation context. Doctor should show current credential and receive/send transport evidence after live traffic. Also confirm that the Web conversation and Channel detail pages still load after the second message.
A successful reply refreshes the last accepted-send time and can clear an earlier send failure. An unchanged readiness state does not mean the timestamp should stop updating. Some Preview probe axes remain unavailable even when real messaging works; inspect the reported axis and diagnostic rather than treating an unavailable probe as proof that every capability failed.
Messages, Media, and Commands
The adapter receives and sends text, stages supported inbound media, and can deliver image, video, audio, voice, and file attachments within configured limits. It persists and refreshes the reply context token for the current account and peer. Keep that token under Anyy management; a generic send failure is not by itself a credential-expiry signal. Inspect the diagnostic and platform conversation before starting another QR flow or repeating an uncertain reply.
Common Weixin commands include:
/status
/stop
/new
/voice
/voice manages spoken replies for that channel conversation when TTS is configured.
An error while delivering a command's reply does not undo a completed local action. Check the current conversation and account state before manually repeating the command.
Reauthenticate an Expired Session
When the remote credential expires, channel status becomes credential-expired and remediation asks for a new QR scan. Return to Dashboard → Channel → Weixin, start authentication again, scan, confirm, then rerun Doctor.
Do not paste or manually edit a token captured from another account. Anyy binds the committed remote identity and credential lifecycle to the configured channel account.
If a Gateway restart loses the live QR polling handle, the attempt closes as unknown or expired. It does not automatically request another QR; start a fresh scan through the channel page.
If only the login request's response is lost, retry or reload the login page to recover the same request. A new QR requires an explicit refresh. Dashboard keeps each request recoverable for ten minutes, without extending the QR's five-minute lifetime; after that window, return to account settings.
Troubleshooting
| Symptom | Check |
|---|---|
| QR code expires | Start a new authentication attempt and scan within five minutes |
| Phone asks for an unsupported verification path | Cancel and use the supported QR-confirm flow; the profile is Preview |
| Status says credential expired | Scan a new QR code from the channel page |
| Message arrives but reply fails | Check send transport, context token state, media limit, and long-poll health |
| Unexpected sender can message Anyy | Open the bound account's settings, choose allowlist, enter the allowed sender identities and save |
For shared channel diagnostics, see Messaging Platforms.