WSAPI icon

WSAPI

Interact with WSAPI WhatsApp API

Overview

This node integrates with the WSAPI WhatsApp API to retrieve information about WhatsApp users. Specifically, the "Get User" operation under the "User" resource fetches details for a WhatsApp user based on their phone number. This is useful in scenarios where you want to enrich your workflow with user-specific data from WhatsApp, such as verifying user identity, fetching profile information, or managing contacts.

Practical examples include:

  • Automatically retrieving user details when a new message arrives from an unknown number.
  • Enriching CRM records with WhatsApp user information.
  • Validating if a phone number corresponds to an active WhatsApp user before sending messages.

Properties

Name Meaning
Phone Number The phone number of the WhatsApp user to get information about. Include country code without "+" symbol (e.g., "1234567890" for a US number). This is a required field.
Cache Results Whether to cache the result for repeated requests with the same phone number. If enabled, subsequent requests for the same number within the TTL will use cached data. Defaults to false.
Cache TTL (sec) Time-to-live for the cache entry in seconds. Defines how long cached results remain valid. Only applicable if caching is enabled. Default is 300 seconds (5 minutes). Minimum value is 1 second.

Output

The node outputs JSON data containing the retrieved user information from the WhatsApp API. The exact structure depends on the API response but typically includes fields such as user ID, name, profile picture URL, status, and other metadata related to the WhatsApp user.

If the node supports binary data output (not explicitly shown here), it would typically represent media or profile pictures associated with the user, but this is not indicated in the provided code or properties.

Dependencies

  • Requires an API key credential for authenticating with the WSAPI WhatsApp API.
  • The base URL for the API is configured via credentials.
  • No additional external dependencies are indicated beyond the WSAPI service.

Troubleshooting

  • Invalid Phone Number Format: Ensure the phone number includes the country code but excludes the "+" symbol. For example, use "1234567890" instead of "+1234567890".
  • User Not Found: If the phone number does not correspond to a registered WhatsApp user, the API may return an error or empty response.
  • API Authentication Errors: Verify that the API key credential is correctly set up and has sufficient permissions.
  • Caching Issues: If caching is enabled but stale data is returned, consider adjusting the Cache TTL or disabling caching during troubleshooting.
  • Unknown Resource or Operation: The node throws errors if an unsupported resource or operation is selected; ensure "User" resource and "Get User" operation are chosen.

Links and References

Discussion