Zalo CN User  icon

Zalo CN User

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

Overview

This node manages Zalo user-related operations, specifically for the "Zalo User" resource. The operation Lấy Danh Sách Bạn Bè (Get All Friends) retrieves a list of friends from a Zalo user account. It is useful when you want to automate interactions with your Zalo contacts, such as exporting friend lists, syncing contacts, or performing batch actions on friends.

Practical examples include:

  • Exporting your Zalo friends to another system.
  • Filtering or analyzing your friend list based on custom criteria.
  • Automating messaging or friend management workflows by first retrieving all friends.

Properties

Name Meaning
Limit Max number of results to return. Specifies how many friends to retrieve from the list.

Output

The output JSON contains a single field:

  • friends: An array of friend objects representing the retrieved friends up to the specified limit.

Each friend object typically includes details about the friend as returned by the Zalo API (such as user ID, name, etc.), though exact fields depend on the underlying API response.

No binary data output is produced by this operation.

Example output structure:

{
  "friends": [
    {
      "id": "123456789",
      "name": "Friend Name",
      // other friend details...
    },
    // more friends...
  ]
}

Dependencies

  • Requires valid Zalo API credentials including an API key credential that provides cookie, IMEI, and user agent information.
  • Uses the external zalo-api-final library to interact with the Zalo platform.
  • Node configuration must include these credentials to authenticate API requests.

Troubleshooting

  • Common issues:

    • Invalid or expired credentials may cause authentication failures.
    • Missing or malformed cookie, IMEI, or user agent values can prevent successful login.
    • Requesting a limit higher than the actual number of friends will simply return fewer results without error.
  • Error messages:

    • "No API instance found. Please make sure to provide valid credentials."
      This indicates failure to authenticate with Zalo API. Verify that the provided credentials are correct and contain all required fields.
    • Errors during API calls will be thrown with their message; enabling "Continue On Fail" allows processing subsequent items even if one fails.

Links and References

Discussion