Wassenger icon

Wassenger

Interact with Wassenger WhatsApp API

Actions148

Overview

This node integrates with the Wassenger WhatsApp API to manage WhatsApp sessions, specifically enabling users to scan a QR code to establish or refresh a WhatsApp session. This operation is essential for authenticating and linking a WhatsApp number to the Wassenger service, allowing subsequent message sending and receiving.

Common scenarios include:

  • Initial setup of a WhatsApp number in an automation workflow.
  • Re-authenticating a WhatsApp session if it expires or becomes invalid.
  • Forcing a new QR code generation to reconnect a device.

Practical example:
A user wants to automate customer support via WhatsApp. They use this node to scan the QR code for their WhatsApp number, establishing a session that allows the workflow to send and receive messages on behalf of that number.

Properties

Name Meaning
WhatsApp Number The ID of the WhatsApp number/device to connect. This is selected from available devices.
Force New QR Boolean option 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 output contains a JSON object representing the QR code data needed to authenticate the WhatsApp session. The exact structure depends on the chosen QR encoding format:

  • SVG: Returns the QR code as an SVG string.
  • JSON: Returns QR code data in JSON format.
  • Base64 / Base64 URI: Returns the QR code image encoded in Base64 or as a Base64 URI.
  • URI: Returns the QR code as a URI string.
  • Image: Returns the QR code as an image binary (if supported).

This output can be used to display the QR code to the user for scanning with their WhatsApp mobile app.

Dependencies

  • Requires an active Wassenger API key credential configured in n8n for authentication.
  • Depends on the Wassenger WhatsApp API service being accessible.
  • The node dynamically loads available WhatsApp numbers/devices via a method named getDevices.

Troubleshooting

  • Common issues:

    • Invalid or expired API key: Ensure the API key credential is valid and has proper permissions.
    • No available WhatsApp numbers/devices: Verify that your Wassenger account has at least one registered WhatsApp number.
    • QR code not refreshing: Use the "Force New QR" option to generate a new QR code if the current session is stuck or expired.
  • Error messages:

    • Errors related to session destruction or QR generation typically indicate connectivity or permission problems with the Wassenger API.
    • If the node returns an error about missing devices, check the getDevices method and ensure your account has linked devices.

Links and References

Discussion