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 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.
  • Synchronize user details from another system to Zalo accounts.
  • Customize user profiles for marketing or customer engagement purposes.

Properties

Name Meaning
Name Display name of the Zalo user.
Date of Birth User's birth date 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 property.

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 about the updated account settings
  }
}

No binary data is produced by this operation.

Dependencies

  • Requires a valid Zalo API credential with authentication details including cookie, IMEI, and user agent.
  • 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 failed login attempts.
    • Incorrect date format for the Date of Birth field causing API errors.
    • 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 that credentials are correctly configured and valid.
    • Errors related to individual items will be reported per item if "Continue On Fail" is enabled; otherwise, execution stops at the first error.
  • Resolution tips:

    • Verify all required input properties are provided and correctly formatted.
    • Ensure the API key/credential used has proper permissions.
    • Use "Continue On Fail" cautiously to handle partial failures gracefully.

Links and References

Discussion