Add a QQ Bot Account
This skill adds a new QQ Bot account as a secondary bot under an existing channels.qqbot configuration.
Prerequisites
- An existing
channels.qqbotentry withenabled: trueinopenclaw.json - You have the new bot's appId and clientSecret from QQ Open Platform
Config Structure
QQ Bot supports multi-account via the accounts field inside channels.qqbot:
"channels": {
"qqbot": {
"enabled": true,
"appId": "existing-bot-id",
"clientSecret": "existing-bot-secret",
"accounts": {
"bot2": {
"enabled": true,
"appId": "new-bot-id",
"clientSecret": "new-bot-secret"
},
"bot3": {
"enabled": true,
"appId": "another-bot-id",
"clientSecret": "another-bot-secret"
}
}
}
}
- Each account key (e.g.
"bot2","bot3") is an arbitrary alias you choose - Each account launches its own WebSocket connection and maintains an independent token cache, isolated by
appId - Log lines are tagged with the owning account for diagnostics
Interactive CLI Alternative
openclaw channels add --channel qqbot --account <alias> --token "<appSecret>"
This stores credentials in the OpenClaw credentials store. Note: --token-file only sets AppSecret; you still need appId in config or QQBOT_APP_ID env var.
Workflow: Adding via Config Edit
- Read current config — open
~/.openclaw/openclaw.jsonand locate thechannels.qqbotblock - Identify last existing account — find the last entry in
accounts(or note there are none yet) - Add new entry — insert a new account with
enabled: true,appId, andclientSecret, comma-separated from the previous entry - Validate — verify the JSON is well-formed (commas, braces balance)
- Save — Gateway hot-reloads automatically; no restart needed
Important Notes
- OpenIDs are per-bot. An OpenID from Bot A cannot be used to send messages via Bot B. Each bot sees its own set of user OpenIDs.
- Credentials are in plaintext in
openclaw.jsonby default. For production, consider SecretRef (env var or file-backed). - Account-level TTS overrides are supported — add a
ttsblock inside the account config. - To remove an account, set
enabled: falseor delete the entry.