|
| 1 | +--- |
| 2 | +summary: "Zalo ClawBot channel setup through the external openclaw-zaloclawbot plugin" |
| 3 | +read_when: |
| 4 | + - You want a personal Zalo assistant bot with QR-code login |
| 5 | + - You are installing or troubleshooting the openclaw-zaloclawbot channel plugin |
| 6 | +title: "Zalo ClawBot" |
| 7 | +--- |
| 8 | + |
| 9 | +OpenClaw connects to Zalo ClawBot through the catalog-listed external |
| 10 | +`@zalo-platforms/openclaw-zaloclawbot` plugin. Login uses a Zalo Mini App QR |
| 11 | +code. |
| 12 | + |
| 13 | +## Compatibility |
| 14 | + |
| 15 | +| Plugin Version | OpenClaw Version | npm dist-tag | Status | |
| 16 | +| -------------- | ---------------- | ------------ | ------------- | |
| 17 | +| 0.1.x | >=2026.4.10 | `latest` | Active / Beta | |
| 18 | + |
| 19 | +## Prerequisites |
| 20 | + |
| 21 | +- Node.js **>= 22** |
| 22 | +- [OpenClaw](https://docs.openclaw.ai/install) must be installed (`openclaw` CLI available). |
| 23 | +- A Zalo account on a mobile device to scan the login QR code. |
| 24 | + |
| 25 | +## Install with onboard (recommended) |
| 26 | + |
| 27 | +Run the OpenClaw onboarding wizard and pick **Zalo ClawBot** from the channel menu: |
| 28 | + |
| 29 | +```bash |
| 30 | +openclaw onboard |
| 31 | +``` |
| 32 | + |
| 33 | +The wizard installs the plugin from the official catalog (integrity-verified), renders the login QR right in the terminal, and finishes the channel once you scan it with the Zalo app. No extra commands are needed. |
| 34 | + |
| 35 | +## Manual Installation |
| 36 | + |
| 37 | +To add the channel to an already-onboarded gateway, follow these steps: |
| 38 | + |
| 39 | +### 1. Install the plugin |
| 40 | + |
| 41 | +```bash |
| 42 | +openclaw plugins install "@zalo-platforms/openclaw-zaloclawbot@0.1.4" |
| 43 | +``` |
| 44 | + |
| 45 | +Use the exact pinned version shown above (it matches the official catalog entry), so OpenClaw verifies the package against the catalog integrity hash during install. |
| 46 | + |
| 47 | +### 2. Enable the plugin in config |
| 48 | + |
| 49 | +```bash |
| 50 | +openclaw config set plugins.entries.openclaw-zaloclawbot.enabled true |
| 51 | +``` |
| 52 | + |
| 53 | +### 3. Generate QR code and log in |
| 54 | + |
| 55 | +```bash |
| 56 | +openclaw channels login --channel openclaw-zaloclawbot |
| 57 | +``` |
| 58 | + |
| 59 | +Scan the terminal-rendered QR code using the Zalo mobile app, accept the Terms of Use inside the Zalo Mini App, and authorize the session. |
| 60 | + |
| 61 | +### 4. Restart the gateway |
| 62 | + |
| 63 | +```bash |
| 64 | +openclaw gateway restart |
| 65 | +``` |
| 66 | + |
| 67 | +--- |
| 68 | + |
| 69 | +## How It Works |
| 70 | + |
| 71 | +Unlike the standard developer Zalo channel which requires you to register your own Zalo Official Account (OA) and paste static developer credentials, Zalo ClawBot operates as an **owner-bound personal assistant** using a shared, official infrastructure: |
| 72 | + |
| 73 | +1. **Secure Onboarding:** The QR code resolves to a secure Zalo Mini App that binds a newly-provisioned, private bot under a shared official OA directly to your Zalo User ID. |
| 74 | +2. **Owner-Bound Privacy:** By design, the bot is restricted to communicating _only_ with its owner. Messages from other users are dropped at the platform level, making the connection private and secure. |
| 75 | +3. **Official API path:** The plugin uses Zalo Bot Platform APIs instead of |
| 76 | + browser or web-session automation. |
| 77 | + |
| 78 | +## Under the Hood |
| 79 | + |
| 80 | +The Zalo ClawBot plugin communicates with Zalo APIs via a persistent long-polling message loop. To maintain a clean and lightweight runtime: |
| 81 | + |
| 82 | +- Long-poll connections utilize the `getUpdates` endpoint. |
| 83 | +- Webhooks are disabled by default for local desktop/terminal gateway runs. |
| 84 | +- Messages are processed client-side and mapped directly to your local agent runtime. |
| 85 | + |
| 86 | +The external plugin manages bot credentials under the OpenClaw state directory. |
| 87 | +Treat that directory as sensitive and include it in the same access-control and |
| 88 | +backup policy as the rest of your OpenClaw state. |
| 89 | + |
| 90 | +--- |
| 91 | + |
| 92 | +## Troubleshooting |
| 93 | + |
| 94 | +- **QR Login Timeout:** The login token (`zbsk`) expires after 5 minutes for security reasons. If the QR code expires before you scan it, simply rerun the login command to generate a new one. |
| 95 | +- **Gateway Fails to Load:** Ensure your OpenClaw host version is `2026.4.10` or higher. Older versions do not support the external npm-plugin installation ledger. |