Zalo User icon

Zalo User

Quản lý người dùng Zalo

User → Xóa tin nhắn

AI-generated

Overview

This node operation allows users to delete a specific message in a Zalo chat conversation. It supports deleting messages in both personal and group chats by specifying the thread ID, message ID, client message ID, and the sender's user ID. Users can choose to delete the message only for themselves or for all participants (with a note that deleting for all requires using the 'undo message' feature). This operation is useful for managing chat content, removing unwanted or sensitive messages from conversations.

Use Case Examples

  1. Deleting a message from a personal chat by providing the thread ID, message ID, client message ID, and setting 'Only Me' to true to remove the message only from the user's view.
  2. Deleting a message from a group chat by specifying the group thread ID and message details, with the option to delete only for the user or for everyone (using the undo feature).

Properties

Name Meaning
Thread ID ID of the user or group chat where the message to be deleted is located.
Loại cuộc trò chuyện Type of conversation, either personal (Cá nhân) or group (Nhóm).
Message ID ID of the message to be deleted.
Client Message ID Client-side message ID of the message to be deleted.
Only Me Boolean flag indicating whether to delete the message only for the user (true) or for all participants (false). Note: To delete a message for everyone, the 'undo message' feature should be used instead.
User ID From ID of the user who sent the message to be deleted.

Output

JSON

  • status - Status of the delete operation, e.g., 'Thành công' for success or 'Lỗi' for error.
  • response - Response data from the delete message API call.
  • error - Error message if the delete operation fails.
  • hint - Hint message suggesting to use the 'undo message' feature if deletion for all participants is attempted incorrectly.

Dependencies

  • Zalo API credentials including cookie, IMEI, and user agent for authentication.

Troubleshooting

  • If the error message includes 'use undo api instead', it indicates that deleting the message for all participants is not allowed via this operation. The user should use the 'undo message' feature instead to delete the message for everyone.
  • Errors related to invalid or expired credentials (cookie, IMEI, user agent) may prevent the API from authenticating and performing the delete operation.
  • Network or API errors may cause the operation to fail; ensure stable internet connection and valid API access.

Discussion