Overview
This node enables logging into the Zalo platform using a QR code and manages the associated credential information. It facilitates obtaining user details such as username, phone number, and user ID by scanning a QR code for authentication. The node also handles storing and updating credential data, including cookies and device identifiers, which can be reused for subsequent API requests.
Common scenarios where this node is beneficial include:
- Automating login to Zalo accounts without manual password entry.
- Integrating Zalo user authentication into workflows.
- Managing multiple Zalo account credentials programmatically.
- Using Zalo API services that require authenticated sessions.
Practical example:
- A workflow that logs into a Zalo account via QR code scan, retrieves user info, and then triggers further actions like sending messages or fetching contacts through authenticated API calls.
Properties
| Name | Meaning |
|---|---|
| Proxy | HTTP proxy URL to route Zalo API requests through (format: https://user:pass@host:port) |
Output
The node outputs an array of JSON objects with the following structure:
success(boolean): Indicates if the login and credential handling were successful.message(string): Describes the result status, e.g., "Login successful" or error messages.fileName(string): The filename of the saved QR code image (zalo-qr-code.png).usingExistingCredential(boolean): Whether an existing credential was used or a new login occurred.credentialType(string|null): Type of credential used or null if none.- Binary data field named
data: Contains the QR code image in binary form, allowing it to be displayed or saved externally.
This output allows downstream nodes to access both the login status and the QR code image for user interaction or further processing.
Dependencies
- Requires an API key credential for authenticating requests to an external service managing Zalo credentials.
- Uses an HTTP client library to send POST requests to a remote API endpoint for saving and updating credential data.
- Access to the local filesystem to save and read credential cache files.
- Optional use of an HTTP proxy if specified in the input properties.
- Environment must support asynchronous operations and file system access.
Troubleshooting
Common issues:
- Failure to scan or authenticate via QR code due to expired or invalid QR codes.
- Network errors when connecting to the Zalo API or the external credential management service.
- Missing or invalid API key credential causing authorization failures.
- File system permission errors when reading or writing credential cache files.
Error messages and resolutions:
- Timeout waiting for QR code scan: Ensure the QR code is scanned promptly; increase timeout if needed.
- "Response status" errors from API calls: Verify network connectivity and API key validity.
- Credential file not found or corrupted: Delete the cache file manually to force regeneration.
- Proxy connection errors: Check proxy URL format and credentials.