Platform Configuration
Platform configuration is used to set authentication information and platform-specific parameters for platform bots.
Configuration Format
Platform configuration uses the {platform}.{account_id} format:
yaml
{platform}.{account_id}:
# Platform-specific configuration
platform_param1: value1
platform_param2: value2
# Protocol configuration (optional, overrides general)
{protocol}.{version}:
protocol_param: valueWeChat Platform
Configuration Fields
appid
- Type:
string - Required: ✅
- Description: WeChat Official Account AppID
appsecret
- Type:
string - Required: ✅
- Description: WeChat Official Account AppSecret
token
- Type:
string - Required: ✅
- Description: Server configuration Token (must match public platform settings)
encoding_aes_key
- Type:
string - Required: ❌
- Description: Message encryption/decryption key (required when encryption mode is enabled)
encrypt_mode
- Type:
string - Values:
plain|compatible|safe - Default:
plain - Description: Message encryption/decryption mode
plain: Plain text modecompatible: Compatible modesafe: Safe mode (encrypted)
Configuration Example
yaml
wechat.my_official_account:
# WeChat platform configuration
appid: wx1234567890abcdef
appsecret: your_app_secret_here
token: your_token_here
encoding_aes_key: your_aes_key_here
encrypt_mode: safe
# Protocol configuration
onebot.v11:
use_http: true
use_ws: trueGetting Configuration Information
- Log in to WeChat Public Platform
- Development → Basic Configuration
- Get AppID and AppSecret
- Set Server Configuration
Webhook URL
Configure server URL as:
http://your-domain:6727/wechat/{account_id}/webhookFor example:
http://bot.example.com:6727/wechat/my_official_account/webhookQQ Platform
✅ Implemented
Configuration Fields
appId
- Type:
string - Required: ✅
- Description: QQ Bot AppID
secret
- Type:
string - Required: ✅
- Description: QQ Bot Secret
mode
- Type:
string - Values:
websocket|webhook - Default:
websocket - Description: Event receiving mode
sandbox
- Type:
boolean - Default:
false - Description: Whether to use sandbox environment
Configuration Example
yaml
qq.my_bot:
# Protocol configuration
onebot.v11:
use_http: true
use_ws: true
# QQ platform configuration
appId: your_app_id
secret: your_app_secret
mode: websocket
sandbox: falseOther Platforms
For configuration details of other platforms, see:
- QQ Platform
- Kook Platform
- Discord Platform
- DingTalk Platform
- Telegram Platform
- Feishu Platform
- Slack Platform
- WeCom Platform
- Microsoft Teams Platform