WAHA API icon

WAHA API

Complete WhatsApp automation with WAHA API - Multi-engine support

Overview

The "Get Session" operation of the WAHA API node allows users to retrieve detailed information about a specific WhatsApp session. This is useful for monitoring the status, configuration, and metadata of an active or inactive WhatsApp session managed through the WAHA API. Typical use cases include checking if a session is connected, retrieving session details for debugging, or confirming session parameters before performing further actions like sending messages or managing chats.

For example, a user might want to verify that a particular WhatsApp session is active and ready before sending automated messages or starting group management operations.

Properties

Name Meaning
Session Name The name identifier of the WhatsApp session to query. Defaults to a configured default session.
Additional Fields A collection of optional fields (not specifically used in this operation) such as Filename, Mimetype, Link Description, Link Title, Contact Name, Contact Number, Reaction emoji, Limit on number of results, and Download Media flag. These are generally for other operations but available here as part of the node's input schema.

Output

The output JSON contains the full response from the WAHA API endpoint /api/sessions/{sessionName}. This typically includes detailed session information such as:

  • Session status (e.g., connected, disconnected)
  • Session configuration details
  • Metadata related to the session lifecycle
  • Possibly QR code status or authentication state

The exact structure depends on the WAHA API response but will be a JSON object representing the session's current state and properties.

No binary data is output by this operation.

Dependencies

  • Requires an API key credential for the WAHA API service.
  • Optionally uses another API key credential for an auxiliary validation service ("N8N Tools API") to validate subscription and API key before making the main request.
  • The node expects the WAHA API base URL and API key to be configured in credentials.
  • The session name must correspond to an existing session managed by the WAHA API.

Troubleshooting

  • Invalid Subscription or API Key: If the auxiliary validation API returns 401 or 403 errors, the node throws an error indicating invalid subscription or API key. Verify that the API keys are correct and have the necessary permissions.
  • Unknown Session Operation: If the operation parameter is incorrect or unsupported, the node throws an error specifying the unknown operation.
  • Session Not Found or Inactive: If the specified session name does not exist or is inactive, the WAHA API may return an error or empty response. Confirm the session name is correct and the session is active.
  • Network or API Errors: General HTTP errors from the WAHA API will be propagated. Check network connectivity and API availability.

Links and References

Discussion