Zalo — Followers
List users — zalo.list_users
List OA users, up to 50 per page (offset up to 9951). Filter by tag_name, is_follower or last_interaction_period (TODAY, YESTERDAY, L7D, L30D or YYYY_MM_DD:YYYY_MM_DD).
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | no | yes | — |
Input
| Field | Type | Required | Description |
|---|---|---|---|
offset | integer | yes | Min 0. Max 9951. |
count | integer | yes | Min 1. Max 50. |
tag_name | string | no | |
last_interaction_period | string | no | TODAY, YESTERDAY, L7D, L30D or YYYY_MM_DD:YYYY_MM_DD. |
is_follower | string | no | One of: true, false. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
data | object | One page of users. |
data.total | integer | Total users that match the filter. |
data.count | integer | Number of users requested. |
data.offset | integer | Position of the first user in this page. |
data.users | array of object | Users in this page. |
data.users[].user_id | string | Zalo user ID. |
Get user — zalo.get_user
Get a user's profile: name, alias, tags, notes, last interaction and shared contact info.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | no | yes | — |
Input
| Field | Type | Required | Description |
|---|---|---|---|
user_id | string | yes | Zalo user ID of the OA follower. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
data | object | The user's profile. |
data.user_id | string | Zalo user ID. |
data.user_id_by_app | string | The user's ID within the connected app. |
data.user_external_id | string | The user's ID in your own system. Empty string when not set. |
data.display_name | string | Name shown on the user's Zalo profile. |
data.user_alias | string | Alias the OA gave the user. |
data.is_sensitive | boolean | True when the user is under 18, false when 18 or older. |
data.user_last_interaction_date | string | Date of the user's last interaction with the OA, dd/MM/yyyy. |
data.user_is_follower | boolean | True while the user follows the OA. |
data.avatar | string | URL of the user's avatar. |
data.avatars | object | Avatar URLs by size, keyed by pixel size. The reference table types this as a string; its example shows an object. |
data.avatars.120 | string | URL of the 120 px avatar. |
data.avatars.240 | string | URL of the 240 px avatar. |
data.dynamic_param | string | Last dynamic_param the user arrived with through the OA's Dynamic URL. Missing when none. |
data.tags_and_notes_info | object | Tags and notes the OA set on the user. |
data.tags_and_notes_info.notes | array of string | Notes on the user. |
data.tags_and_notes_info.tag_names | array of string | Tags on the user. |
data.shared_info | object | Contact details the user shared with the OA. Empty when the user shared none. |
data.shared_info.name | string | Name the user shared. |
data.shared_info.phone | string | Phone number the user shared. The reference also shows it as a number. |
data.shared_info.address | string | Street address the user shared. |
data.shared_info.city | string | City the user shared. |
data.shared_info.district | string | District the user shared. |
data.shared_info.user_dob | string | Birthday the user shared, dd/MM/yyyy. |
Update user — zalo.update_user
Update a user's shared contact info, alias or external ID.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | yes | no | — |
Input
| Field | Type | Required | Description |
|---|---|---|---|
user_id | string | yes | Zalo user ID of the OA follower. |
shared_info | object | no | Contact details the user shared with the OA. |
shared_info.name | string | no | |
shared_info.phone | string | no | |
shared_info.address | string | no | |
shared_info.city_id | string | no | |
shared_info.district_id | string | no | |
shared_info.user_dob | string | no | Birthday, dd/MM/yyyy. |
user_alias | string | no | |
user_external_id | string | no |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
data | object | Not returned: Zalo replies only error and message. |
Get user custom info — zalo.get_user_custom_info
Get a user's custom field values. Limit the result with fields_to_export.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | no | yes | — |
Input
| Field | Type | Required | Description |
|---|---|---|---|
user_id | string | yes | Zalo user ID of the OA follower. |
fields_to_export | array of string | no | Custom field names to return. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
data | object | The user's profile and custom field values. |
data.user_id | string | Zalo user ID. |
data.name | string | Name of the user. Empty when unknown. |
data.phone | string | Phone number. Empty when unknown. |
data.user_dob | string | Birthday, dd/MM/yyyy. |
data.gender | string | Gender of the user. |
data.full_address | object | Address of the user. |
data.full_address.user_city | string | City. |
data.full_address.user_ward | string | Ward. |
data.full_address.user_address | string | Street address. |
data.user_external_id | string | The user's ID in your own system. Empty string when not set. |
data.dynamic_param | string | Last dynamic_param the user arrived with through the OA's Dynamic URL. |
data.custom_info | object | Custom field values, keyed by the OA's own field names (for example loyaltyPoints_number). Every value is a string (booleans as "true"/"false", numbers as text); a table field is an object whose values are strings. This reply sends error as the string "0". |
Update user custom info — zalo.update_user_custom_info
Set a user's custom field values. custom_info maps field name to value.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | yes | no | — |
Input
| Field | Type | Required | Description |
|---|---|---|---|
user_id | string | yes | Zalo user ID of the OA follower. |
custom_info | object | yes | Map of custom field name to value. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
data | object | Not returned: Zalo replies only error and message. |
Delete user info — zalo.delete_user_info
Delete the personal info the OA stored for a user. Cannot be undone.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | high | yes | no | — |
Input
| Field | Type | Required | Description |
|---|---|---|---|
user_id | string | yes | Zalo user ID of the OA follower. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
data | object | Not returned: Zalo replies only error and message. |