# Connect Zalo

The **Channels → Zalo** page (`/{slug}/channels/zalo`) lets you connect personal Zalo accounts via QR code and manage both **Accounts** and **Proxies** from a single view.

:::note[Required permissions]
- **View Zalo channels**: **`nick:read:all`**, **`nick:connect`**, or **`nick:operate`**.
- **Connect new / Re-login via QR**: **`nick:connect`**.
- **Reconnect / Disconnect / Manage Proxies**: **`nick:operate`**.
- **Remove account**: **`nick:delete`**.
:::

## Connect a Zalo Account via QR Code

1. Go to **Channels → Zalo** (or **All Channels**), click **Add Channel**, and choose **Zalo**.
2. **Step 1 — Select Proxy**:
   - Choose an existing proxy from your workspace pool, or select **Connect directly**.
   - If you do not have any proxies yet, click **Add Proxy** to import one inline without leaving the wizard.
3. **Step 2 — Generate & Scan QR Code**:
   - Click **Generate QR**. OmnyBot queues a QR login session (rate-limited to **10 requests/minute** per user).
   - Open the **Zalo** mobile app, scan the displayed QR code, and confirm login.
4. Once authenticated, the dialog closes automatically and the account appears in your channel list. Closing the dialog before scanning automatically cancels the in-flight QR handshake.

:::tip[Subscription plan cap]
The backend enforces your workspace's channel cap (`maxNicks`) when connecting a new Zalo account or reactivating a billing-locked/trashed account. Upgrade your plan or remove unused accounts if you hit the limit.
:::

## Zalo Account Statuses

| Status | Meaning | Recommended Action |
| :--- | :--- | :--- |
| **`CONNECTED`** | The live Zalo session is active and sending/receiving messages in real time. | No action needed. |
| **`DISCONNECTED`** | The session is temporarily disconnected, but credentials are still stored. | Select **Reconnect** from the `⋮` menu. |
| **`DIED`** | The session expired or was invalidated by Zalo. | Check the account on the Zalo mobile app, then select **Re-login via QR** from the `⋮` menu. |
| **`LOGGED_IN_ELSEWHERE`** | The session was signed out because the Zalo account logged in on another device or browser. | Coordinate device usage with your team, then select **Re-login via QR** from the `⋮` menu. |
| **`LOCKED`** | The account is billing-suspended (`billingLocked`) because the plan expired or exceeded its cap. | Renew or upgrade your plan, then unlock the account. |

## Account Management Actions

Click the **`⋮`** menu at the end of a Zalo account row to access:

- **Reconnect** (`nick:operate`): Restarts the live session for a `DISCONNECTED` account.
- **Re-login via QR** (`nick:connect`): Opens the QR wizard in revive mode to restore a `DIED` session. Re-logging into an already active, non-trashed account does not consume an extra plan slot.
- **Disconnect** (`nick:operate`): Tears down an active (`CONNECTED`) session and sets it to `DISCONNECTED` without removing the account or its data.
- **Remove Account** (`nick:delete`): Logs out and soft-deletes the account from the active channel list.

:::caution[Removing an account does not permanently delete data]
Choosing **Remove Account** preserves all conversation history, messages, and contacts. The account moves to **Settings → Trash** (`/{slug}/settings/trash`), where you can **restore** or **permanently purge** it—or simply scan the QR code again with the same Zalo account in the same workspace to recover it.
:::

## Related Guides

- [Zalo Settings: Proxies, Tags & Message Templates](/channels/zalo-settings/)
- [Channels Overview](/channels/overview/)