WhatsApi icon

WhatsApi

Connect with WhatApp HTTP API

Overview

This node integrates with a WhatsApp HTTP API to update the presence status of a chat. It allows users to programmatically set their presence (such as "available", "unavailable", or other custom statuses) for a specific chat identified by its JID (Jabber ID). This is useful in scenarios where you want to reflect your availability or activity status dynamically, for example, indicating when you are typing, online, or away in a WhatsApp conversation.

Practical examples:

  • Automatically setting presence to "typing" when a user starts composing a message.
  • Marking presence as "unavailable" during off-hours or when the user is inactive.
  • Updating presence status based on external triggers like calendar events or system states.

Properties

Name Meaning
Phone The session identifier representing the phone number or account used for the WhatsApp API connection. Defaults to the phone number credential.
To The chat JID (Jabber ID) identifying the target chat to update presence for.
Presence The presence status to set for the chat. This is a string value sent in the request body.

Output

The node outputs JSON data reflecting the response from the WhatsApp HTTP API after attempting to update the presence. This typically includes confirmation of the updated presence status or error details if the update failed.

No binary data output is indicated.

Dependencies

  • Requires an active WhatsApp HTTP API service endpoint.
  • Needs an API key or authentication token configured via credentials to authorize requests.
  • The base URL and authentication details must be set up in the node's credentials configuration.

Troubleshooting

  • Invalid Session ID or Phone: If the sessionId (phone) is incorrect or expired, the API will reject the request. Ensure the phone number credential is valid and active.
  • Incorrect JID Format: The "To" property must be a valid WhatsApp JID (e.g., [email protected]). Invalid formats will cause errors.
  • Unauthorized Access: Missing or invalid API credentials will result in authorization errors. Verify that the API key/token is correctly configured.
  • Unsupported Presence Value: Sending an unsupported presence string may cause the API to reject the request. Use only documented presence values supported by the WhatsApp API.
  • Network Issues: Connectivity problems to the WhatsApp API endpoint can cause timeouts or failures. Check network access and endpoint availability.

Links and References

Discussion