Zalo Login Via QR Code icon

Zalo Login Via QR Code

LĐăng nhập Zalo bằng QR code và lưu thông tin vào Credentia

Overview

This node facilitates logging into the Zalo messaging platform using a QR code. It generates a QR code that users can scan with the Zalo app to authenticate. The node supports using existing Zalo API credentials or n8n account credentials to streamline the login process. Upon successful login, it captures and saves the Zalo session credentials, optionally creating new credentials via the n8n API. This node is useful for automating Zalo login workflows, managing Zalo session credentials, and integrating Zalo authentication into broader automation processes.

Use Case Examples

  1. Automate Zalo login for chatbot or messaging automation by generating a QR code for user authentication.
  2. Use existing Zalo API credentials to refresh session tokens without manual login.
  3. Save and manage Zalo session credentials automatically after QR code login for seamless API access.

Properties

Name Meaning
Proxy HTTP proxy to use for Zalo API requests, allowing network requests to be routed through a specified proxy server.

Output

Binary

The node outputs the generated QR code image in PNG format as binary data, which can be used to display or share the QR code for scanning.

JSON

  • success - Indicates whether the QR code generation and login process was successful.
  • message - Descriptive message about the login or QR code generation status.
  • fileName - The filename of the generated QR code image.
  • usingExistingCredential - Boolean indicating if existing credentials were used for login.
  • credentialInstructions - Instructions related to the credentials used or created during the login process.
  • credentialName - Name of the credential used or created.
  • credentialId - ID of the credential used or created.
  • credentialType - Type of credential used (e.g., n8nZaloApi or zaloApi).
  • autoCreateApi - Indicates if credentials will be automatically created via the n8n API after successful login.
  • credentialFilePath - File path where credentials are saved if automatic creation is not possible.
  • autoCreateScript - Script name to manually create credentials if automatic creation fails.

Dependencies

  • Uses Zalo API credentials or n8n account credentials for authentication.
  • Requires an HTTP proxy if specified for network requests.
  • Uses the 'zca-js' library for Zalo API interactions.
  • Uses 'axios' for HTTP requests to the n8n API for credential management.

Troubleshooting

  • Timeout generating QR code: Increase the timeout duration or check network connectivity to Zalo API.
  • No credentials provided: The node will generate a QR code for manual login; ensure you scan it promptly.
  • Credential creation failures: Check n8n API credentials and network access to the n8n API endpoint.
  • QR code expired: Retry the login process to generate a new QR code.
  • Errors in saving credentials locally or to the server: Verify file system permissions and server API availability.

Links

Discussion