WhatsApp API icon

WhatsApp API

Integração com WhatsApp API para envio de mensagens e gerenciamento

Overview

This node integrates with a WhatsApp API to manage WhatsApp sessions, send messages, and handle related entities such as contacts, tickets, and opportunities. Specifically, the "Session - Delete" operation allows users to delete an existing WhatsApp session by specifying its WhatsApp ID. This is useful for cleaning up or removing inactive or obsolete WhatsApp sessions from the system.

Practical examples:

  • Automatically deleting a WhatsApp session when it is no longer needed.
  • Managing multiple WhatsApp sessions programmatically by deleting sessions that are expired or replaced.
  • Integrating session lifecycle management into automated workflows.

Properties

Name Meaning
WhatsApp ID The unique numeric identifier of the WhatsApp session to be deleted.

Output

The output is a JSON object representing the response from the WhatsApp API after attempting to delete the specified session. It typically contains confirmation of deletion or error details if the operation failed.

No binary data is output by this operation.

Example output structure (conceptual):

{
  "success": true,
  "message": "Session deleted successfully",
  "whatsappId": 1
}

Or in case of error:

{
  "error": "Session not found"
}

Dependencies

  • Requires an API key credential for authenticating with the WhatsApp API service.
  • The node uses the base URL and instance ID configured in the credentials to construct API requests.
  • The WhatsApp API must support session management endpoints for creating, starting, showing QR codes, and deleting sessions.

Troubleshooting

  • Common issues:

    • Invalid or missing WhatsApp ID: Ensure the WhatsApp ID provided corresponds to an existing session.
    • Authentication errors: Verify that the API key credential is valid and has necessary permissions.
    • Network or API endpoint errors: Check connectivity and that the base URL and instance ID are correctly configured.
  • Error messages:

    • "Session not found": The specified WhatsApp ID does not exist; verify the ID.
    • "Unauthorized" or authentication failures: Recheck API credentials.
    • "Unknown error occurred": Generic catch-all; inspect logs or API responses for more details.

Links and References

Discussion