WaliChat icon

WaliChat

Interact with WaliChat WhatsApp API

Actions148

WhatsApp session → Scan QR

AI-generated

Overview

This node integrates with the WaliChat WhatsApp API to manage WhatsApp sessions, specifically enabling users to scan a QR code to establish or refresh a WhatsApp session for a selected WhatsApp number. This operation is essential when setting up or reconnecting a WhatsApp device in automation workflows.

Common scenarios include:

  • Initializing a new WhatsApp session by scanning the QR code.
  • Forcing a new QR code generation if the existing session is invalid or expired.
  • Retrieving the QR code in various formats suitable for display in different environments (e.g., web apps, mobile apps).

Practical example:

  • A user wants to automate sending messages via WhatsApp but needs to authenticate the WhatsApp number first. They use this node to generate and scan the QR code, establishing the session required for subsequent messaging operations.

Properties

Name Meaning
WhatsApp Number The ID of the WhatsApp number/device to connect the session with. Options are dynamically loaded.
Force New QR Boolean flag to force destroying any existing session and request a fresh QR code.
QR Encoding Format in which the QR code image is returned. Options: SVG (default), JSON, Base64, Base64 URI, URI, Image

Output

The node outputs a JSON object containing the result of the QR code scan request. The exact structure depends on the API response but generally includes:

  • The QR code data encoded in the selected format (e.g., SVG string, Base64 string).
  • Status information about the session creation or refresh.
  • Any relevant metadata related to the WhatsApp session.

If the QR code is returned as binary data (e.g., an image), it will be provided in the specified encoding format suitable for rendering or further processing.

Dependencies

  • Requires a valid API key credential for authenticating with the WaliChat WhatsApp API.
  • The node relies on dynamic loading of available WhatsApp numbers/devices via a method that fetches these options.
  • No additional external dependencies beyond the configured API access.

Troubleshooting

  • Common issues:

    • Failure to generate or retrieve the QR code may occur if the WhatsApp number/device ID is invalid or not registered.
    • Forcing a new QR without proper cleanup might cause conflicts; ensure the previous session is properly terminated.
    • Network or authentication errors if the API key is missing, invalid, or lacks necessary permissions.
  • Error messages:

    • Errors related to "invalid device ID" indicate the selected WhatsApp number does not exist or is not accessible.
    • Authentication failures suggest checking the API key configuration.
    • Timeout or connectivity errors require verifying network access to the WaliChat API endpoint.

Resolving these typically involves verifying input parameters, ensuring correct API credentials, and confirming the WhatsApp number is active and linked.

Links and References

Discussion