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 "Thay đổi cài đặt tài khoản" (Change Account Setting) operation specifically allows updating a user's profile details including display name, date of birth, gender, and language preference.

Practical examples:

  • Automatically update user profile information in bulk based on external data sources.
  • Customize user account settings programmatically after onboarding new users.
  • Maintain consistent user metadata across multiple systems integrated with Zalo.

Properties

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

Output

The output JSON contains:

  • status: A string indicating success, typically "Thành công" (Success).
  • response: The raw response from the Zalo API after attempting to change the account settings. This may include confirmation details or updated user data.

Example output structure:

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

No binary data is produced by this operation.

Dependencies

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

Troubleshooting

  • Common issues:

    • Invalid or expired credentials leading to authentication failures.
    • Incorrectly formatted date of birth causing API rejection.
    • Missing required parameters like name, DOB, or gender.
  • Error messages:

    • "No API instance found. Please make sure to provide valid credentials."
      Resolution: Verify that the Zalo API credentials are correctly configured and not expired.
    • API errors returned in the response field may indicate validation issues; check parameter formats and values.
  • Enable "Continue On Fail" in the node settings to handle partial failures gracefully when processing multiple items.

Links and References

Discussion