docs/en/platform/weixin-official-account.md
AstrBot supports WeChat Official Account integration (version >= v3.5.8). After setup, you can chat with AstrBot directly in the WeChat Official Account chat interface.
Bots in the left sidebar.+ Create Bot.weixin_official_account.A configuration dialog will appear. Keep it open and continue.
Open WeChat Official Account Platform.
Official Account.[!NOTE] A newly registered account may require 1-2 days for review before it can be used.
Open Settings & Development -> Development Interface Management.
Copy AppID and AppSecret from WeChat platform to AstrBot fields appid and secret.
Open IP whitelist and add your public IP(s), one per line if multiple.
In server configuration, click modify.
Token: create any string with length 3-32, and fill the same value in AstrBot token.EncodingAESKey: click random generate and fill AstrBot encoding_aes_key.Keep Unified Webhook Mode (unified_webhook_mode) enabled (recommended), then save AstrBot config and wait for restart.
For URL:
http://<your-domain>/callback/command.[!NOTE] WeChat Official Account callback supports only ports 80 or 443. You usually need a domain and reverse proxy:
- Unified mode enabled: forward to AstrBot port
6185- Unified mode disabled: forward to adapter port
6194
Set message encryption mode to Security Mode.
Wait a moment and click Submit. If configuration is correct, you will see success.
In WeChat Official Account platform, open account profile and find your QR code.
Scan it with WeChat, send help, and check whether AstrBot replies.
If it replies, integration is successful.
[!NOTE] If console shows
ip xxxxx not in whitelist, your public IP is not in WeChat whitelist yet. Add it and wait a few minutes for WeChat to refresh.
AstrBot supports custom endpoint via api_base_url for environments without stable public IP.
Install ffmpeg for voice input support.
apt install ffmpegbrew install ffmpeg