rune-ext-zalo

Implements Zalo Official Account API integration and personal account automation via zca-js.

1|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/dangvu008/VietTruyen --skill rune-ext-zalo-dangvu008
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rune-ext-zalo
Source: https://github.com/dangvu008/VietTruyen/tree/main/.agents/skills/rune-ext-zalo
Command: npx skills add https://github.com/dangvu008/VietTruyen --skill rune-ext-zalo-dangvu008

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires zca-js, @modelcontextprotocol/sdk, hono, p-queue, zod, and includes references (resource) components.

What problem does it solve? Zalo's developer ecosystem lacks a Node.js SDK, webhook handling, and clear documentation for its dual-token OAuth2 flow, making it hard to build chatbots and messaging automation on Vietnam's dominant messaging platform. ## Core Features & Use Cases - Official Account API (Track A): OAuth2 PKCE flow with token auto-refresh, all 8 OA message types, webhook server with signature verification, and an MCP server blueprint connecting AI agents to Zalo. - Personal Account Automation (Track B): QR login and personal/group messaging via zca-js, gated behind an explicit risk disclaimer about ToS violations and ban risk. - Rate Limiting & Anti-Ban: Shared token-bucket rate limiting, exponential backoff, and quota monitoring applied to every outbound API call. - Use Case: A Vietnamese dev team builds a customer support chatbot where an AI agent reads incoming Zalo OA messages via MCP tools and replies after confirmation, with rate limiting preventing account bans. ## Quick Start Ask the agent to set up a Zalo Official Account integration with OAuth2, webhook handling, and rate-limited messaging for a customer support bot.

Frequently Asked Questions about rune-ext-zalo

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a Zalo Official Account chatbot in Node.js?

Register an OA app, implement the OAuth2 PKCE flow with dual token management, then send messages via the v3.0 /message/cs endpoint. Add a webhook server with signature verification and token auto-refresh middleware to handle expiring access tokens.

How to connect an AI agent to Zalo using an MCP server?

Run a webhook server and MCP server in the same Node.js process sharing an in-memory message queue. Expose tools like zalo_read_messages, zalo_send_message, and zalo_get_profile so the agent can poll incoming messages and reply through the OA API.

What is the difference between Zalo OA API and zca-js?

The OA API is the official, production-safe track for business chatbots using OAuth2 and webhooks. zca-js is an unofficial reverse-engineered library for personal accounts that violates Zalo's ToS and risks account bans, suitable only for prototypes and personal projects.

Why does my Zalo message fail with error 12?

Error 12 means the user has not interacted with your OA in the last 7 days, so customer service messages are blocked. Use pre-approved Transaction or Promotion templates instead, which bypass the 7-day window.

How do I avoid getting my Zalo account banned when automating messages?

Implement token-bucket rate limiting per endpoint with exponential backoff before any messaging call. Treat sustained HTTP 429 responses as a ban-risk signal and back off for at least 60 seconds rather than retrying immediately.

Can I use zca-js for a production customer-facing bot?

No. zca-js uses unofficial APIs that violate Zalo's Terms of Service, can break without notice, and risk permanent account suspension. For production business systems, use the Official Account API track instead.