Back to Eliza

Zalo Plugin

packages/docs/plugin-registry/platform/zalo.md

2.0.11.9 KB
Original Source

The Zalo plugin connects Eliza agents to Zalo, enabling message handling through the Zalo Official Account API.

Package: @elizaos/plugin-zalo

Installation

bash
eliza plugins install @elizaos/plugin-zalo

Setup

1. Create a Zalo Official Account

  1. Go to the Zalo Developers portal
  2. Create an application and obtain your App ID and App Secret
  3. Generate an access token and refresh token for API access

2. Configure Eliza

json
{
  "connectors": {
    "zalo": {
      "accessToken": "YOUR_ACCESS_TOKEN",
      "secretKey": "YOUR_SECRET_KEY",
      "refreshToken": "YOUR_REFRESH_TOKEN",
      "appId": "YOUR_APP_ID"
    }
  }
}

Or via environment variables:

bash
export ZALO_ACCESS_TOKEN=YOUR_ACCESS_TOKEN
export ZALO_SECRET_KEY=YOUR_SECRET_KEY
export ZALO_APP_ID=YOUR_APP_ID

Configuration

FieldRequiredDescription
accessTokenYesZalo API access token
secretKeyYesZalo application secret key
appIdNoZalo application ID
refreshTokenNoToken refresh credential
enabledNoSet false to disable (default: true)

Environment Variables

VariableRequiredDescription
ZALO_ACCESS_TOKENYesZalo API access token (primary auto-enable trigger)
ZALO_SECRET_KEYYesZalo application secret key
ZALO_REFRESH_TOKENNoZalo API refresh token
ZALO_APP_IDNoZalo application ID
ZALO_ENABLEDNoEnable or disable the connector
ZALO_PROXY_URLNoProxy URL for API requests
ZALO_USE_POLLINGNoUse polling instead of webhooks
ZALO_WEBHOOK_URLNoWebhook callback URL
ZALO_WEBHOOK_PATHNoWebhook endpoint path
ZALO_WEBHOOK_PORTNoWebhook listener port