Method: users.threads.delete
ลบชุดข้อความที่ระบุอย่างถาวรทันที ข้อความทั้งหมดในชุดข้อความจะถูกลบออกด้วย การดำเนินการนี้เลิกทำไม่ได้ แนะนำให้ใช้ threads.trash
แทน
คำขอ HTTP
DELETE https://gmail.googleapis.com/gmail/v1/users/{userId}/threads/{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 thread and all its associated messages, an irreversible action."],["Requires user ID and thread ID as path parameters in the DELETE request."],["Uses Gmail API and needs authorization with the `https://mail.google.com/` scope."],["Request body should be empty, and a successful deletion results in an empty response body."],["Consider using `threads.trash` for a reversible alternative to thread deletion."]]],["This document outlines how to permanently delete a Gmail thread and its associated messages via an HTTP DELETE request. The request requires specifying the `userId` (user's email, or \"me\") and the `id` of the thread. The URL follows gRPC Transcoding syntax. The request body must be empty, and a successful deletion returns an empty response. This action is irreversible. Authorization needs the `https://mail.google.com/` OAuth scope. Prefer trashing a thread over deleting it.\n"]]