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 webhook notifications. Example format: ABEiGUJDHF9HGI8K1L2M3N4O5P6Q7R8S.
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 rejected call or error details if the rejection failed.

If the node supports binary data output (not indicated here), it would represent media or attachments related to the call, but this operation primarily deals with JSON responses.

Dependencies

  • Requires an active connection to the WSAPI WhatsApp API.
  • Needs an API key credential configured in n8n for authentication.
  • The base URL for the WSAPI must be set in the credentials.
  • 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 can prevent communication with the WSAPI.
    • Insufficient permissions or invalid API credentials may lead to authorization errors.
  • 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 will be included in the node output; check these for specific failure reasons.
  • Resolution tips:

    • Verify that Call ID and Caller ID are correctly obtained from prior steps or webhooks.
    • Confirm API credentials and base URL configuration.
    • Use the node’s "Continue On Fail" option to handle errors gracefully in workflows.

Links and References

Discussion