Press Ticket icon

Press Ticket

Interage com a API do Press Ticket®

Overview

This node interacts with the Press Ticket® API to manage WhatsApp connections and related resources. Specifically, for the WhatsApp - Obter QR Code operation, it retrieves the QR code image associated with a given WhatsApp connection ID. This QR code is typically used to authenticate or pair the WhatsApp connection with a device or service.

Common scenarios where this node is beneficial include:

  • Automating the retrieval of WhatsApp connection QR codes for quick setup or re-authentication.
  • Integrating WhatsApp connection management into broader workflows that require dynamic access to connection status or credentials.
  • Monitoring and managing multiple WhatsApp connections programmatically.

Practical example:

  • A user wants to automate the process of restarting a WhatsApp connection and then retrieving its new QR code to display on a dashboard for scanning.

Properties

Name Meaning
ID do WhatsApp The unique identifier of the WhatsApp connection for which the QR code will be retrieved.

Output

The output JSON object for the "Obter QR Code" operation includes:

  • qrcode: The raw QR code string.
  • qrcodeImage: A data URI string representing the QR code as a PNG image encoded in base64 (data:image/png;base64,...).
  • whatsappId: The ID of the WhatsApp connection for which the QR code was obtained.

This allows downstream nodes or UI components to easily display or use the QR code image for authentication purposes.

Dependencies

  • Requires an active connection to the Press Ticket® API.
  • Requires an API token credential configured in n8n to authenticate requests to the Press Ticket® API.
  • The node uses HTTP requests to endpoints under the base URL provided by the API credential.

Troubleshooting

  • Error: Invalid or missing WhatsApp ID
    Ensure the "ID do WhatsApp" property is correctly set and corresponds to an existing WhatsApp connection in the Press Ticket® system.

  • Error: Authentication failed
    Verify that the API token credential is valid and has sufficient permissions to access WhatsApp connection data.

  • Error: QR code not found in response
    This may indicate the WhatsApp connection is not in a state that produces a QR code (e.g., already connected). Check the connection status before requesting the QR code.

  • Network or timeout errors
    Confirm network connectivity to the Press Ticket® API endpoint and that the API service is operational.

Links and References

  • Press Ticket® API Documentation (hypothetical link, replace with actual if available)
  • n8n Documentation on HTTP Request Node (for understanding underlying request mechanics)
  • General WhatsApp Business API guides for context on QR code usage and connection management.

Discussion