elizaOS Plugin: Zalo User (Python)
Zalo Personal Account integration for elizaOS agents via zca-cli.
Overview
This plugin enables elizaOS agents to interact with Zalo personal accounts using the zca-cli tool. It supports:
- QR code login flow
- Direct messages (DMs) and group messages
- Multi-profile support
- Friend and group listing
- Media sending (images, links)
Prerequisites
You must have zca-cli installed:
npm install -g zca-cli
Then authenticate with your Zalo account:
zca auth login
Installation
pip install elizaos-plugin-zalouser
Configuration
Set the following environment variables:
| Variable | Description | Required |
|---|---|---|
ZALOUSER_ENABLED |
Enable/disable the plugin | No (default: true) |
ZALOUSER_DEFAULT_PROFILE |
Default zca profile to use | No (default: default) |
ZALOUSER_COOKIE_PATH |
Path to cookie file for auth persistence | No |
ZALOUSER_IMEI |
IMEI for authentication | No |
ZALOUSER_USER_AGENT |
User agent for API requests | No |
ZALOUSER_PROFILES |
JSON config for multiple profiles | No |
ZALOUSER_ALLOWED_THREADS |
JSON array or comma-separated list of allowed thread IDs | No |
ZALOUSER_DM_POLICY |
DM policy: open, allowlist, pairing, disabled |
No (default: pairing) |
ZALOUSER_GROUP_POLICY |
Group policy: open, allowlist, disabled |
No (default: disabled) |
ZALOUSER_LISTEN_TIMEOUT |
Listen timeout in ms | No (default: 30000) |
Usage
from elizaos_plugin_zalouser import ZaloUserService, ZaloUserConfig, SendMessageParams
# Create config
config = ZaloUserConfig.from_env()
# Create and start service
service = ZaloUserService(config)
await service.start()
# Send a message
result = await service.send_message(
SendMessageParams(
threadId="123456789",
text="Hello from elizaOS!",
)
)
# List friends
friends = await service.list_friends()
# List groups
groups = await service.list_groups()
# Stop service
await service.stop()
License
MIT
Metadata
Release files for elizaos-plugin-zalouser 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| elizaos_plugin_zalouser-2.0.0.tar.gz | 17.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| elizaos_plugin_zalouser-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.9 kB
Release files / elizaos_plugin_zalouser-2.0.0.tar.gz
| Download URL | elizaos_plugin_zalouser-2.0.0.tar.gz |
|---|---|
| Size | 17.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4cb939c7e314a2bf9177db48f0600e0b48082849b7d30600dd8d8a1a4cc0f212
|
|
BLAKE2b-256 checksum How to use checksums |
8ea5a0c6d211bae05cf1c5e35ac86a76e2f1efc5020634cd746fd73cce12a11f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Release files / elizaos_plugin_zalouser-2.0.0-py3-none-any.whl
| Download URL | elizaos_plugin_zalouser-2.0.0-py3-none-any.whl |
|---|---|
| Size | 15.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
13c119895bdc6b2526b207e230fdeed6abfa48db45f0d6a243c6c6a3ff02e5d6
|
|
BLAKE2b-256 checksum How to use checksums |
7bd78e2df9499499c279eb66b42191ae5cbc851f3459790a32189ec098b8b8ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|