Zalo User icon

Zalo User

Quản lý người dùng Zalo

Zalo User → Tìm Kiếm Người Dùng

AI-generated

Overview

This node interacts with Zalo User services, allowing users to manage and query Zalo user information programmatically. Specifically, the "Tìm Kiếm Người Dùng" (Find User) operation enables searching for a Zalo user by their phone number. This is useful in scenarios where you want to verify if a phone number corresponds to a Zalo account or retrieve basic user details associated with that number.

Practical examples include:

  • Verifying customer phone numbers against Zalo accounts before sending messages.
  • Enriching contact data by fetching Zalo user profiles linked to phone numbers.
  • Automating friend requests or other interactions based on phone number lookups.

Properties

Name Meaning
Phone Number The phone number to search for a Zalo user. This is a required string input.
Limit The maximum number of results to return from the search. This is a required number input.

Output

The output JSON contains the result of the user search by phone number. It typically includes user details returned by the Zalo API for the matched phone number(s). The exact structure depends on the API response but generally includes user profile information such as user ID, name, avatar, and other public details.

No binary data output is produced by this operation.

Example output snippet (conceptual):

{
  "userId": "123456789",
  "name": "Nguyen Van A",
  "avatar": "https://example.com/avatar.jpg",
  "phoneNumber": "0123456789"
}

Dependencies

  • Requires an API key credential to authenticate with the Zalo API service.
  • The node uses stored credentials including cookie, IMEI, and user agent strings to establish a session.
  • The zca-js library is used internally to interact with the Zalo API.
  • Proper configuration of the Zalo API credentials within n8n is necessary for successful execution.

Troubleshooting

  • Invalid Credentials: If the node throws an error about missing or invalid API instance, ensure that the Zalo API credentials are correctly configured and valid.
  • No Results Found: Searching by phone number may return empty results if the number is not registered on Zalo or privacy settings restrict access.
  • Rate Limits: Excessive requests might be throttled by the Zalo API; consider adding delays or handling rate limit errors gracefully.
  • Network Issues: Connectivity problems can cause failures; verify network access to the Zalo API endpoints.
  • Error Handling: If the node is set to continue on failure, errors will be included in the output JSON under an error field for each failed item.

Links and References

Discussion