Overview
The node "DinastiAPI Chat" enables interaction with the DinastiAPI WhatsApp API to perform various chat-related operations. Specifically, the Set Presence operation allows users to set the presence state of a WhatsApp user, such as showing or hiding typing or recording indicators in a chat.
This is useful in scenarios where you want to programmatically indicate to a chat recipient that you are typing a message or recording audio, enhancing the interactivity and responsiveness of automated chatbots or integrations.
Practical examples:
- Show a "typing" indicator while your bot is preparing a response.
- Hide the typing indicator once the message is sent.
- Indicate that an audio message is being recorded.
Properties
| Name | Meaning |
|---|---|
| Phone Number | The phone number for which to set the presence state (e.g., 5491155553934). |
| State | The presence state to set: - Typing ( composing): Show typing indicator.- Not Typing ( paused): Hide typing indicator. |
| Media Type | The type of media being composed: - None ( ""): Regular typing indicator.- Audio ( audio): Recording audio indicator. |
Output
The output JSON contains the response from the DinastiAPI WhatsApp API after setting the presence state. It typically includes confirmation or status information about the presence update.
No binary data is output by this operation.
Dependencies
- Requires an active connection to the DinastiAPI WhatsApp API.
- Requires an API key credential configured in n8n for authenticating requests to the DinastiAPI.
- The node uses the internal helper function to make authenticated POST requests to the
/chat/presenceendpoint of the API.
Troubleshooting
Common issues:
- Invalid or missing phone number format may cause the API request to fail.
- Incorrect or expired API credentials will result in authentication errors.
- Network connectivity problems can prevent successful API calls.
Error messages:
- Errors returned from the API will be included in the node's output if "Continue On Fail" is enabled.
- Typical error messages might include invalid phone number, unauthorized access, or malformed request.
Resolution tips:
- Verify the phone number format matches the expected international format without spaces or special characters.
- Ensure the API key credential is correctly set up and has necessary permissions.
- Check network connectivity and API service status.
Links and References
- DinastiAPI WhatsApp API Documentation (example placeholder link)
- WhatsApp Presence States Explained (general reference)