Method: users.messages.batchDelete
Xoá nhiều thư theo mã nhận dạng thư. Không đảm bảo rằng thông báo đã không bị xoá hoặc thậm chí không tồn tại.
Yêu cầu HTTP
POST https://gmail.googleapis.com/gmail/v1/users/{userId}/messages/batchDelete
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số đường dẫn
Tham số |
userId |
string
Địa chỉ email của người dùng. Giá trị đặc biệt me có thể dùng để cho biết người dùng đã được xác thực.
|
Nội dung yêu cầu
Nội dung yêu cầu chứa dữ liệu có cấu trúc sau:
Biểu diễn dưới dạng JSON |
{
"ids": [
string
]
} |
Trường |
ids[] |
string
Mã nhận dạng của các tin nhắn cần xoá.
|
Nội dung phản hồi
Nếu thành công, nội dung phản hồi sẽ trống.
Phạm vi uỷ quyền
Yêu cầu phạm vi OAuth sau:
Để biết thêm thông tin, hãy xem Hướng dẫn uỷ quyền.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2024-09-05 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2024-09-05 UTC."],[[["This endpoint allows you to delete multiple messages in Gmail by providing a list of message IDs."],["The request is sent as a POST request to a specific URL with the user's email address as a path parameter."],["The request body requires a JSON object containing an array of message IDs to be deleted."],["Although it doesn't guarantee the existence or prior deletion status of the messages, it efficiently processes bulk message deletions."],["Proper authorization with the `https://mail.google.com/` scope is necessary for successful execution."]]],["This document details the process of batch deleting messages in Gmail via an API. It uses a `POST` request to `https://gmail.googleapis.com/gmail/v1/users/{userId}/messages/batchDelete`, specifying the user via the `userId` path parameter. The request body, in JSON format, contains an array `ids` of message IDs to be deleted. The response body is empty upon successful deletion. This action requires the `https://mail.google.com/` OAuth scope. No guarantees are made about the existence or prior deletion of specified message IDs.\n"]]