Tools
Wechat Openclaw
A stupidly simple WeChat OpenClaw plugin/
Install
openclaw plugins install @thesomewhatyou/openclaw-wechat
README
# @thesomewhatyou/openclaw-wechat
Unofficial WeChat Official Account channel plugin for OpenClaw. Supports inbound webhooks (plaintext mode) and outbound text replies via the custom message API.
## Install
```bash
pnpm add @thesomewhatyou/openclaw-wechat
# or npm/yarn
```
Then install into OpenClaw:
```bash
openclaw plugins install @thesomewhatyou/openclaw-wechat
openclaw plugins enable wechat
```
Restart the gateway after enabling.
## Configure
Set `channels.wechat` (or `channels.wechat.accounts.<id>`) in your config:
```json5
{
"channels": {
"wechat": {
"appId": "wx123...",
"appSecret": "your-app-secret",
"token": "verification-token",
"webhookPath": "/wechat/webhook",
"dmPolicy": "pairing",
"allowFrom": ["*"],
"markdown": {}
}
}
}
```
Multi-account is supported under `channels.wechat.accounts.<accountId>`. Defaults:
- webhook path: `/wechat[/<accountId>]/webhook`
- text chunk limit: ~1800 chars
- dmPolicy: `pairing`
Environment / file overrides:
- `WECHAT_APP_ID`, `WECHAT_APP_SECRET`, `WECHAT_TOKEN`
- Per-account: `WECHAT_APP_ID_<ACCOUNTID>`, `WECHAT_APP_SECRET_<ACCOUNTID>`, `WECHAT_TOKEN_<ACCOUNTID>`
- `appSecretFile`, `tokenFile`
After configuring, point your WeChat server URL to the gateway host + webhook path and set the same `token`. Only plaintext mode is supported (no AES decryption).
## Limitations
- Text-only (no media/cards). Planned, but unsure how to implement.
- Plaintext callbacks only (no AES).
- No group chats (WeChat Official Accounts receive 1:1).
## Development
- Entry: `index.ts`
- Plugin manifest: `openclaw.plugin.json`
- Uses `fast-xml-parser` for inbound XML parsing.
---
### WE HAVE TECHNOLOGIA!

tools
Comments
Sign in to leave a comment