Skip to main content

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

elizaos_plugin_zalouser-2.0.0.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

elizaos_plugin_zalouser-2.0.0-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file elizaos_plugin_zalouser-2.0.0.tar.gz.

File metadata

  • Download URL: elizaos_plugin_zalouser-2.0.0.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for elizaos_plugin_zalouser-2.0.0.tar.gz
Algorithm Hash digest
SHA256 4cb939c7e314a2bf9177db48f0600e0b48082849b7d30600dd8d8a1a4cc0f212
MD5 074421f86c90ba49235ee78f698076bb
BLAKE2b-256 8ea5a0c6d211bae05cf1c5e35ac86a76e2f1efc5020634cd746fd73cce12a11f

See more details on using hashes here.

File details

Details for the file elizaos_plugin_zalouser-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for elizaos_plugin_zalouser-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 13c119895bdc6b2526b207e230fdeed6abfa48db45f0d6a243c6c6a3ff02e5d6
MD5 85d67995459af1471e2ffd0e614334ea
BLAKE2b-256 7bd78e2df9499499c279eb66b42191ae5cbc851f3459790a32189ec098b8b8ec

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page