Zalo User icon

Zalo User

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

Overview

This node manages Zalo user accounts by interacting with the Zalo platform through an API. It supports various operations such as accepting or sending friend requests, blocking/unblocking users, changing account avatars, updating account settings, retrieving user information, listing friends, and finding users by phone number.

The specific operation "Thay đổi cài đặt tài khoản" (Change Account Setting) allows you to update a Zalo user's profile details including display name, date of birth, gender, and language preference.

Practical examples:

  • Automatically update user profiles in bulk based on external data sources.
  • Synchronize user information from other systems into Zalo accounts.
  • Customize user settings programmatically for marketing or customer support purposes.

Properties

Name Meaning
Name Display name of the Zalo user to set.
Date of Birth User's date of birth in the format YYYY-MM-DD.
Gender User's gender. Options: Male (1), Female (2), Other (3).
Language Preferred language code, e.g., "vi" for Vietnamese, "en" for English. Optional field.

Output

The output JSON contains:

  • status: A string indicating success, typically "Thành công" (Success).
  • response: The raw response object returned from the Zalo API after changing the account settings.

Example output structure:

{
  "status": "Thành công",
  "response": {
    // API response details here
  }
}

No binary data is output by this operation.

Dependencies

  • Requires valid Zalo API credentials including an API key credential that provides cookie, IMEI, and user agent information.
  • Uses the zca-js library to interact with the Zalo API.
  • Node configuration must include these credentials to authenticate API calls.

Troubleshooting

  • Common issues:

    • Invalid or expired credentials causing authentication failure.
    • Incorrect date format for the Date of Birth property.
    • Missing required fields like Name, Date of Birth, or Gender.
  • Error messages:

    • "No API instance found. Please make sure to provide valid credentials."
      Means the node could not authenticate with Zalo API. Check your credentials and ensure they are correctly configured.
    • Errors related to invalid input parameters will be thrown if required properties are missing or malformed.
  • Resolution tips:

    • Verify that the API credentials are up to date and have necessary permissions.
    • Ensure date strings follow the YYYY-MM-DD format exactly.
    • Use the correct integer values for gender as specified.

Links and References

Discussion