WSAPI icon

WSAPI

Interact with WSAPI WhatsApp API

Overview

This node integrates with the WSAPI WhatsApp API to perform various operations related to WhatsApp resources. Specifically, for the Contact resource and the Subscribe to Presence operation, it allows subscribing to presence updates of a WhatsApp contact. This means the node can monitor when a contact comes online or goes offline, which is useful for real-time presence tracking in communication workflows.

Practical scenarios include:

  • Building customer support systems that notify agents when a contact becomes available.
  • Automating marketing or engagement flows based on contact availability.
  • Integrating presence information into CRM or messaging dashboards.

Properties

Name Meaning
Contact ID The WhatsApp contact identifier to subscribe to presence updates for. Format: phone number with country code + @s.whatsapp.net (e.g., 1234567890@s.whatsapp.net).

Output

The node outputs JSON data representing the result of the subscription request. Typically, this will confirm whether the subscription was successful or provide relevant status information from the WSAPI WhatsApp API.

If the node supports binary data output (not indicated explicitly here), it would represent media or file content related to the contact or presence, but for this operation, the output is primarily JSON confirming subscription status.

Dependencies

  • Requires an active connection to the WSAPI WhatsApp API.
  • Needs an API key credential configured in n8n to authenticate requests.
  • The base URL for the WSAPI must be set in the credentials.
  • No additional external dependencies are indicated.

Troubleshooting

  • Common issues:

    • Incorrectly formatted Contact ID (must include country code and @s.whatsapp.net suffix).
    • Missing or invalid API authentication token.
    • Network connectivity issues to the WSAPI endpoint.
    • Attempting to subscribe to presence for a contact not registered or recognized by the WhatsApp API.
  • Error messages:

    • "The resource "contacts" is not known!" — indicates an invalid resource selection; ensure "Contact" resource is chosen.
    • "The operation "subscribePresence" is not implemented yet!" — suggests the operation name might be misspelled or unsupported; verify operation name.
    • API errors returned from WSAPI (e.g., unauthorized, not found) should be checked against the API documentation and credentials.

Links and References

Discussion