Zalo Personal
Connect to a Zalo personal account via zca-cli (QR login): capabilities and configuration.
Status: Experimental. This integration automates a Zalo personal account via zca-cli.
Tutorial.alert.info
Plugin Installation Required
Zalo Personal is provided as a plugin and is not packaged with the core installation.
- CLI install: openclaw plugins install @openclaw/zalouser
- Or install from source checkout: openclaw plugins install ./extensions/zalouser
- Details: ''/plugin''
Prerequisite: zca-cli
The Gateway machine must be able to find the zca binary in PATH.
- Verify: zca --version
- If missing, install zca-cli (see extensions/zalouser/README.md or upstream zca-cli documentation).
Quick Start for Beginners
1. Install the plugin (see above).
2. Login (QR code; run on the gateway machine):
- openclaw channels login --channel zalouser
- Scan the QR code in the terminal with the Zalo mobile app.
3. Enable the channel:
4. Restart the Gateway (or complete onboarding).
5. DM defaults to pairing: the first contact receives a pairing code; approve it to process messages.
{
channels: {
zalouser: {
enabled: true,
dmPolicy: "pairing",
},
},
}What This Is
- Uses zca listen to receive inbound messages.
- Uses zca msg ... to send replies (text/media/links).
- For personal account scenarios where the Zalo Bot API cannot be used.
Naming Note
Channel id uses zalouser, explicitly indicating this is automating a Zalo personal user account (unofficial). zalo is reserved for a possible future official Zalo API integration.
Finding IDs (directory)
Use the directory CLI to find contacts/groups and their corresponding IDs:
openclaw directory self --channel zalouser openclaw directory peers list --channel zalouser --query "name" openclaw directory groups list --channel zalouser --query "work"
Limitations
- Outbound text is segmented by approximately 2000 characters (Zalo client limit).
- Streaming is disabled by default.
Access Control (DM)
channels.zalouser.dmPolicy supports: pairing | allowlist | open | disabled (default pairing).
channels.zalouser.allowFrom accepts user IDs or names. The wizard will resolve names to IDs via zca friend find when possible.
Approve:
- openclaw pairing list zalouser
- openclaw pairing approve zalouser <code>
Group Access (Optional)
- Default: channels.zalouser.groupPolicy = "open" (allows groups). If not set, channels.defaults.groupPolicy can override the default.
- To restrict to allowlist:
- channels.zalouser.groupPolicy = "allowlist"
- channels.zalouser.groups (key is group ID or name)
- Disable all groups: channels.zalouser.groupPolicy = "disabled".
- The configure wizard can prompt for group allowlists.
- On startup, OpenClaw will best-effort resolve group/user names in allowlists to IDs and log the mapping; failed entries remain as-is.
Example:
{
channels: {
zalouser: {
groupPolicy: "allowlist",
groups: {
"123456789": { allow: true },
"Work Chat": { allow: true },
},
},
},
}Multi-Account
Accounts map to zca profiles. Example:
{
channels: {
zalouser: {
enabled: true,
defaultAccount: "default",
accounts: {
work: { enabled: true, profile: "work" },
},
},
},
}Troubleshooting
Can't find zca:
- Install zca-cli and ensure the gateway process's PATH can find it.
Login doesn't persist:
- Run: openclaw channels status --probe
- Re-login:
openclaw channels logout --channel zalouser && openclaw channels login --channel zalouser