Channels
How to Connect OpenClaw to Zalo Personal
Browse more in Channels.
All channels guides →This guide walks you through connecting OpenClaw to Zalo using the Zalo Bot API so your agent can chat with users over Zalo. You will install or enable the bundled Zalo plugin, create a bot token on the Zalo Bot Platform, and wire it into your OpenClaw gateway.
By the end, your OpenClaw agent will respond to direct messages on Zalo with pairing-based access control.
Prerequisites
- ✓An existing OpenClaw gateway deployment where you can edit the config and restart the gateway.
- ✓Access to the Zalo Bot Platform at https://bot.zaloplatforms.com with permission to create a bot.
- ✓A Zalo Bot Creator / Marketplace bot (this guide follows the Marketplace-bot behavior described in the docs).
Steps
- 1
Ensure the Zalo plugin is available in your OpenClaw install
OpenClaw ships the Zalo channel as a bundled plugin in current releases, so most packaged builds already have it. If you run an older build or a custom install that excludes Zalo, install the plugin so the gateway can start the Zalo channel.
bashopenclaw plugins install @openclaw/zalo - 2
Install the Zalo plugin from a source checkout if needed
If you work from a local source checkout instead of a packaged build, you can point the plugin installer at the local Zalo plugin path. This is useful when you vendor plugins alongside your gateway code.
bashopenclaw plugins install ./path/to/local/zalo-plugin - 3
Create a Zalo bot and obtain the bot token
You need a bot token from the Zalo Bot Platform so OpenClaw can authenticate to the Zalo API. Create the bot, configure its settings, and copy the full token string, including both the numeric ID and secret.
text1. Go to https://bot.zaloplatforms.com and sign in. 2. Create a new bot and configure its settings. 3. Copy the full bot token (typically `numeric_id:secret`). For Marketplace bots, the usable runtime token may appear in the bot’s welcome message after creation. - 4
Configure the Zalo bot token in OpenClaw
Wire the Zalo bot token into your gateway config so the Zalo channel can start. You can either set an environment variable for the default account or define the channel block in your configuration file with the token and DM policy.
json{ channels: { zalo: { enabled: true, accounts: { default: { botToken: "12345689:abc-xyz", dmPolicy: "pairing", }, }, }, }, } ZALO_BOT_TOKEN=... - 5
Restart the gateway and approve initial DM pairing
After you add the token, restart your OpenClaw gateway so it can resolve the Zalo config and start the channel. Zalo DMs default to pairing, so when a user first messages the bot, approve their pairing code before messages are processed.
bashopenclaw pairing list zalo openclaw pairing approve zalo <CODE> - 6
Send a test message to your Zalo bot from the CLI
Once the channel is running, you can verify outbound delivery by sending a message from the CLI to a specific Zalo chat ID. This confirms the bot token and routing are working end-to-end.
bashopenclaw message send --channel zalo --target 123456789 --message "hi"
Configuration
| Option | Description | Example |
|---|---|---|
| ZALO_BOT_TOKEN | Bot token from the Zalo Bot Platform for the default Zalo account. | 12345689:abc-xyz |
| channels.zalo.enabled | Enables or disables startup of the Zalo channel in the gateway. | true |
| channels.zalo.botToken | Legacy single-account shorthand for the Zalo bot token from Zalo Bot Platform. | 12345689:abc-xyz |
| channels.zalo.tokenFile | Path to a regular file containing the Zalo bot token; symlinks are rejected. | /etc/openclaw/zalo-token.txt |
| channels.zalo.dmPolicy | Controls DM access policy for Zalo: `pairing | allowlist | open | disabled`. | pairing |
| channels.zalo.allowFrom | DM allowlist of Zalo user IDs; set to "*" when using `open` DM policy. | [123456789,987654321] |
| channels.zalo.groupPolicy | Group inbound handling policy: `open | allowlist | disabled` (present but not usable for Marketplace bots). | allowlist |
| channels.zalo.groupAllowFrom | Allowlist of sender IDs allowed to trigger the bot in groups; falls back to `allowFrom` when unset. | [123456789] |
| channels.zalo.mediaMaxMb | Maximum size in megabytes for inbound and outbound media on Zalo. | 5 |
| channels.zalo.webhookUrl | HTTPS URL that enables webhook mode for receiving Zalo events instead of long-polling. | https://gateway.example.com/zalo/webhook |
| channels.zalo.webhookSecret | Webhook secret used to verify Zalo webhook requests; must be 8–256 characters. | s3cr3tTok3n |
| channels.zalo.webhookPath | HTTP path on the gateway server that handles Zalo webhook requests. | /zalo/webhook |
| channels.zalo.proxy | Proxy URL used for outbound Zalo API requests. | http://proxy.internal:8080 |
| channels.zalo.accounts.<id>.botToken | Per-account Zalo bot token when running multiple Zalo accounts. | 12345689:abc-xyz |
| channels.zalo.accounts.<id>.tokenFile | Per-account token file path for the Zalo bot; must be a regular file. | /etc/openclaw/zalo-account-a.token |
| channels.zalo.accounts.<id>.name | Display name for a specific Zalo account in multi-account setups. | support-bot-vn |
| channels.zalo.accounts.<id>.enabled | Enables or disables a specific Zalo account. | true |
| channels.zalo.accounts.<id>.dmPolicy | Per-account DM policy for a specific Zalo account. | pairing |
| channels.zalo.accounts.<id>.allowFrom | Per-account DM allowlist of Zalo user IDs. | [123456789] |
| channels.zalo.accounts.<id>.groupPolicy | Per-account group policy for Zalo groups (present but not usable for Marketplace bots). | allowlist |
| channels.zalo.accounts.<id>.groupAllowFrom | Per-account group sender allowlist for Zalo groups. | [123456789] |
| channels.zalo.accounts.<id>.webhookUrl | Per-account webhook URL for receiving Zalo events. | https://gateway.example.com/zalo/account-a/webhook |
| channels.zalo.accounts.<id>.webhookSecret | Per-account webhook secret used to verify Zalo webhook requests. | accountASecret1 |
| channels.zalo.accounts.<id>.webhookPath | Per-account webhook path on the gateway HTTP server. | /zalo/account-a/webhook |
| channels.zalo.accounts.<id>.proxy | Per-account proxy URL for Zalo API requests. | http://proxy.internal:8080 |
Troubleshooting
Bot doesn’t respond in Zalo DMs after you message it.
First verify that the Zalo bot token is valid and the channel is up by probing channel status, then confirm the sender is approved via pairing or `allowFrom`. Finally, tail the gateway logs to see if messages are reaching OpenClaw or being rejected.
openclaw channels status --probe
openclaw logs --followWebhook not receiving events from Zalo.
Zalo only sends events to an HTTPS webhook with a valid secret of 8–256 characters, and polling must be disabled because getUpdates and webhooks are mutually exclusive. Check that your gateway HTTP endpoint is reachable on the configured path and that the webhook URL and secret match what you configured in Zalo.
Frequently asked questions
Powered by Mem0
Add persistent memory to OpenClaw
Official Mem0 plugin for OpenClaw keeps context across chats and tools. Smaller prompts, lower cost, better continuity for your agents.