WSAPI icon

WSAPI

Interact with WSAPI WhatsApp API

Overview

This node integrates with the WSAPI WhatsApp API to manage WhatsApp calls. Specifically, the "Reject Call" operation allows users to programmatically reject an incoming WhatsApp call by specifying its unique call ID and the caller's WhatsApp ID. This is useful in automated workflows where calls need to be declined based on certain conditions, such as during non-business hours or when a user is unavailable.

Practical examples:

  • Automatically rejecting calls from unknown numbers.
  • Declining calls during scheduled maintenance windows.
  • Integrating with customer support systems to reject calls if agents are busy.

Properties

Name Meaning
Call ID Unique identifier of the WhatsApp call to reject. Obtainable from WhatsApp call events or webhooks.
Caller ID WhatsApp ID (JID) of the person initiating the call. Format: phone number + @s.whatsapp.net (e.g., 1234567890@s.whatsapp.net).

Output

The node outputs JSON data representing the result of the reject call operation. The exact structure depends on the WSAPI response but typically includes confirmation of the rejection or error details if the operation failed.

If the node handles binary data (not indicated for this operation), it would represent media or file content related to the call, but for rejecting calls, output is purely JSON.

Dependencies

  • Requires an active connection to the WSAPI WhatsApp API via an API key credential configured in n8n.
  • The base URL for the API is taken from the credential configuration.
  • No additional external dependencies beyond the WSAPI service.

Troubleshooting

  • Common issues:

    • Invalid or missing Call ID or Caller ID will cause the operation to fail.
    • Network connectivity problems to the WSAPI endpoint.
    • Insufficient permissions or invalid API credentials.
  • Error messages:

    • "The resource "calls" is not known!" — indicates an incorrect resource parameter; ensure "Call" resource is selected.
    • "The operation "reject" is not implemented yet!" — suggests the operation name might be misspelled or unsupported.
    • API errors returned from WSAPI (e.g., unauthorized, not found) should be checked in the node’s execution logs.
  • Resolutions:

    • Verify that Call ID and Caller ID are correctly provided and formatted.
    • Confirm API credentials and network access.
    • Check WSAPI documentation for any changes in endpoints or required parameters.

Links and References

Discussion