WAHA API icon

WAHA API

Complete WhatsApp automation with WAHA API - Multi-engine support

Overview

This node integrates with the WAHA API to automate WhatsApp interactions. Specifically, the "Contact" resource's "Check Number Exists" operation allows users to verify if a given phone number is registered on WhatsApp. This is useful in scenarios where you want to validate contacts before sending messages or performing other actions, ensuring that the number is active on WhatsApp.

Practical examples include:

  • Validating customer phone numbers before initiating marketing campaigns.
  • Filtering contact lists to exclude non-WhatsApp numbers.
  • Automating workflows that depend on WhatsApp presence verification.

Properties

Name Meaning
Session Name The name of the WhatsApp session to use for the request. Defaults to the credential's default session.
Chat ID The WhatsApp chat identifier, typically a phone number with @c.us suffix (e.g., 5511999999999@c.us). This is the number to check for existence on WhatsApp.
Additional Fields A collection of optional fields; not used directly in this operation but available for other operations.

Output

The output JSON contains the response from the WAHA API indicating whether the specified phone number exists on WhatsApp. The exact structure depends on the API response but generally includes a boolean or status field confirming existence.

Example output snippet (conceptual):

{
  "exists": true,
  "phone": "5511999999999"
}

No binary data is returned by this operation.

Dependencies

  • Requires an API key credential for the WAHA API to authenticate requests.
  • Optionally uses another API key credential for an external validation service to verify subscription and API key validity before making WAHA API calls.
  • The node expects the WAHA API base URL and API key to be configured in credentials.
  • The WhatsApp session name must be provided or defaulted from credentials.

Troubleshooting

  • Invalid Subscription or API Key: If the external validation service returns a 401 or 403 error, the node will throw an error indicating invalid subscription or API key. Verify that your API keys are correct and active.
  • Unknown Contact Operation: If an unsupported operation is selected, the node throws an error specifying the unknown operation.
  • Session Not Found or Invalid: If the session name is incorrect or the session is not active, the API call may fail. Ensure the session name matches an active WhatsApp session.
  • Malformed Chat ID: The chat ID must be a valid WhatsApp identifier (phone number with @c.us). Incorrect formatting will cause the API to reject the request.

Links and References


If you need details on other operations or resources, feel free to ask!

Discussion