Actions29
- Chat Actions
- Contact Actions
- Group Actions
- Message Actions
- Status Actions
Message → Delete Message
AI-generatedOverview
This node operation deletes a specific message from a WhatsApp chat using the Green API. It is useful for scenarios where you need to remove a message either from both sender and receiver sides or only from the sender's side. For example, you might want to delete a mistakenly sent message or remove sensitive information from a chat.
Use Case Examples
- Deleting a message from a private chat by specifying the chat ID and message ID.
- Deleting a message from a group chat by providing the group chat ID and message ID.
- Choosing to delete the message only from the sender's side to keep it visible to other participants.
Properties
| Name | Meaning |
|---|---|
| Chat ID | The identifier of the chat from which the message will be deleted. For private chats, use phone@c.us format; for group chats, use chatId@g.us. |
| Message ID | The unique identifier of the message to be deleted. |
| Delete for Sender Only | Boolean flag indicating whether the message should be deleted only from the sender's side. |
Output
JSON
chatId- The chat ID from which the message was deleted.idMessage- The ID of the deleted message.onlySenderDelete- Indicates if the message was deleted only from the sender's side.result- The response result from the Green API confirming the deletion status.
Dependencies
- Green API credentials including instance ID and API token for authentication.
Troubleshooting
- Ensure the chat ID and message ID are correctly specified; incorrect IDs will cause deletion to fail.
- If deleting only from the sender side, verify that the API and WhatsApp client support this feature.
- Check that the provided API credentials (instance ID and API token) are valid and have the necessary permissions.
- Common error messages include failures to delete due to invalid message ID or insufficient permissions; verify the data sent matches the expected format.
Links
- Green API Delete Message Documentation - Official documentation for the delete message endpoint of Green API.