Actions9
Overview
This node manages Zalo users by interacting with the Zalo platform through various user-related operations. Specifically, for the "Chặn người dùng" (Block User) operation, it allows you to block a specified Zalo user by their user ID. This is useful in scenarios where you want to programmatically restrict interactions with certain users, such as blocking spam accounts or managing contacts.
Practical example: Automatically block users who send unwanted messages by providing their user IDs to this node, helping maintain a clean and controlled contact list on Zalo.
Properties
| Name | Meaning |
|---|---|
| User ID | The ID of the Zalo user to block |
Output
The node outputs a JSON object containing:
status: A string indicating the result status, e.g., "Thành công" (Success).response: The raw response from the Zalo API related to the block action.
Example output JSON structure:
{
"status": "Thành công",
"response": {
/* API response details */
}
}
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential to authenticate with the Zalo platform.
- The node uses stored credentials including cookie, device IMEI, and user agent strings to establish a session.
- The external library
zca-jsis used internally to interact with the Zalo API.
Troubleshooting
Common issues:
- Invalid or expired credentials may cause login failure.
- Providing an incorrect or non-existent User ID will likely result in an error from the Zalo API.
- Network connectivity problems can prevent successful API calls.
Error messages:
"No API instance found. Please make sure to provide valid credentials."
Means the node failed to authenticate with Zalo. Verify that the API key credential is correctly configured and valid.- Errors returned from the Zalo API (e.g., user not found) will be thrown unless "Continue On Fail" is enabled, in which case they appear in the output under an
errorfield.
Links and References
- Zalo Official Developer Documentation
- zca-js GitHub Repository (for the underlying Zalo API client library)