Skip to main content
SocialAPI connects a Zalo Official Account (OA), the business account on Zalo, Vietnam’s messaging app. It reads and answers the direct messages (DMs) that people send to the OA, and it publishes and deletes OA articles. SocialAPI’s own Zalo app connects the account, so you register no Zalo app and complete no step in the Zalo developer portal: see Platform apps.

At a glance

Capabilities

An unsupported call returns 501 resource.not_supported. The capability matrix for every platform is on Supported platforms.

Connect an account

A Zalo Official Account connects through the shared OAuth flow in Connect accounts: send platform: "zalo" to POST /v1/accounts/connect, send the administrator to the returned authorization URL, and read the connected account’s ID from your redirect. Each Zalo authorization covers exactly one Official Account. The connected account’s username is the Official Account’s ID and its display_name is the OA’s name. To connect a second Official Account, run the flow again. SocialAPI renews Zalo’s access tokens (valid for 25 hours) for you. When renewal fails, the first call that fails returns 401 platform.zalo.auth and the account is marked token_expired. Every later call that acts on the account returns 403 account.reconnection_required until you reconnect it. Reconnect with the same brand_id.

Direct messages

SocialAPI lists the Official Account’s conversations, reads their messages, and sends replies to people who interacted with the OA within the last 7 days. Conversations, attachments, buttons, the messaging window, and DM errors are on Zalo direct messages.

Webhook events

Zalo emits dm.received when a person sends the OA a text message: see Zalo direct messages. Zalo also emits the post.* events for articles you publish through SocialAPI, account.connected when you connect the account, and account.disconnected with reason: "posts_sync_auth_failed" when SocialAPI finds that the login needs renewing. A call that returns 401 platform.zalo.auth does not send it: read the account’s status to detect it.

Limits

DM limits are on Zalo direct messages. Zalo limits requests per minute for each app and each Official Account, sets usage quotas per feature, and limits how many messages one person can receive from the OA. When one is used up, the call fails with 429 platform.zalo.rate_limit and no Retry-After header: wait at least 60 seconds, then retry with exponential backoff. A refused send costs 1 interaction credit. When retries with exponential backoff keep returning it, stop: the Official Account’s or the person’s quota is used up.

Scopes

SocialAPI sends no scope list to Zalo. The administrator of the Official Account approves the scopes that Zalo’s consent screen lists for SocialAPI’s Zalo app. Disconnecting the account from SocialAPI does not revoke that authorization on Zalo: the administrator removes it on Zalo. The account supports the posts.read, posts.write, messages.read, and messages.write permissions, which SocialAPI alone enforces.
Last modified on November 15, 2026