Method: users.messages.delete
ลบข้อความที่ระบุอย่างถาวรทันที การดำเนินการนี้เลิกทำไม่ได้ แนะนำให้ใช้ messages.trash
แทน
คำขอ HTTP
DELETE https://gmail.googleapis.com/gmail/v1/users/{userId}/messages/{id}
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
userId |
string
อีเมลของผู้ใช้ สามารถใช้ค่าพิเศษ me เพื่อระบุผู้ใช้ที่ตรวจสอบสิทธิ์แล้ว
|
id |
string
รหัสของข้อความที่จะลบ
|
เนื้อหาของคำขอ
เนื้อหาของคำขอต้องว่างเปล่า
เนื้อหาการตอบกลับ
หากสำเร็จ เนื้อหาการตอบกลับจะว่างเปล่า
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth ต่อไปนี้
โปรดดูข้อมูลเพิ่มเติมที่คู่มือการให้สิทธิ์
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-09-05 UTC
[null,null,["อัปเดตล่าสุด 2024-09-05 UTC"],[[["Permanently deletes a specified message, an irreversible action."],["Requires user ID and message ID to execute."],["Uses an empty request body and returns an empty response body upon success."],["Needs authorization with the `https://mail.google.com/` scope."]]],["The core actions are to permanently delete a specified message using a `DELETE` HTTP request. The request URL structure requires `userId` (user's email, \"me\" for authenticated user) and `id` (message ID) as path parameters. The request body must be empty. A successful deletion returns an empty response body. The process needs authorization via the `https://mail.google.com/` OAuth scope. It is stated that the `messages.trash` is a preferred method than deleting.\n"]]