Connect DotCraft to Weixin
Connect Weixin to DotCraft through Tencent iLink. The first login uses a QR code, and normal replies are sent as plain text.
Quick setup
- Confirm the Weixin account has Tencent iLink bot access.
- Open the target workspace in DotCraft Desktop.
- Open Channels, then select Weixin.
- Keep the default iLink API address unless Tencent gave you a different endpoint.
- Save the channel and turn it on.
- Scan the QR code shown in Desktop.
- Wait until Desktop shows the Weixin channel as connected.
- Send a message to the Weixin bot account.
Platform setup details
Weixin setup is authentication-first:
- Use the Weixin account that Tencent iLink authorizes for bot access.
- Keep Desktop open while the first QR login completes.
- Restarting Desktop normally reuses the saved session.
- Scan a new QR code when Desktop asks you to re-authenticate.
No public callback URL is required for the Desktop-managed Weixin channel.
Test the connection
- Send
helloto the Weixin bot account. - Confirm DotCraft replies in the same chat.
- Send
/new, then send another message and confirm it starts a fresh conversation. - Ask DotCraft to do something that needs approval and reply with an approval keyword.
- Send a task that returns a file or image if your workflow depends on media delivery.
What works after setup
/newstarts a fresh DotCraft conversation in the current Weixin chat.- The login session is saved for normal restarts.
- If the session expires, Desktop shows a new QR code.
- Regular replies and media captions are flattened to plain text because iLink does not expose Markdown rendering.
- File and image delivery are available through channel delivery tools.
- Approval replies accept plain chat keywords such as
同意,允许,yes,approve, andreject.
Standalone adapter
Run the Weixin adapter yourself only when Desktop is not managing the channel process.
bash
cd sdk/typescript
npm run build --workspace @dotcraft/channel-weixin
npx dotcraft-channel-weixin --workspace /path/to/workspaceUse --config /custom/weixin.json when the adapter config is not stored at .craft/weixin.json. In terminal mode, the QR code is rendered in the terminal.
Register the channel as a standalone WebSocket adapter in the shared channel configuration reference.
Reference
See Channel configuration reference for the Weixin JSON example, ExternalChannels registration, and field table.