Method: users.labels.delete
ลบป้ายกำกับที่ระบุและนำออกจากข้อความและชุดข้อความที่ใช้ป้ายกำกับนั้นทันทีและอย่างถาวร
คำขอ HTTP
DELETE https://gmail.googleapis.com/gmail/v1/users/{userId}/labels/{id}
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
userId |
string
อีเมลของผู้ใช้ สามารถใช้ค่าพิเศษ me เพื่อระบุผู้ใช้ที่ตรวจสอบสิทธิ์แล้ว
|
id |
string
รหัสของป้ายกำกับที่จะลบ
|
เนื้อหาของคำขอ
เนื้อหาของคำขอต้องว่างเปล่า
เนื้อหาการตอบกลับ
หากสำเร็จ เนื้อหาการตอบกลับจะว่างเปล่า
ขอบเขตการให้สิทธิ์
ต้องมีขอบเขต OAuth อย่างใดอย่างหนึ่งต่อไปนี้
https://mail.google.com/
https://www.googleapis.com/auth/gmail.modify
https://www.googleapis.com/auth/gmail.labels
โปรดดูข้อมูลเพิ่มเติมที่คู่มือการให้สิทธิ์
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-09-05 UTC
[null,null,["อัปเดตล่าสุด 2024-09-05 UTC"],[[["Permanently deletes the specified label and removes it from associated messages and threads."],["Uses a DELETE HTTP request to `https://gmail.googleapis.com/gmail/v1/users/{userId}/labels/{id}`."],["Requires specifying the user ID (or `me` for the authenticated user) and the label ID as path parameters."],["Needs authorization with specific OAuth scopes, such as `https://mail.google.com/` or `https://www.googleapis.com/auth/gmail.modify`."],["Sends an empty request body and returns an empty response body upon successful deletion."]]],["This document outlines the process for deleting a Gmail label via API. The `DELETE` request targets `https://gmail.googleapis.com/gmail/v1/users/{userId}/labels/{id}`, requiring the user's email or \"me\" and the label's ID. The request body must be empty. A successful deletion yields an empty response body. Authorization requires one of three specified OAuth scopes, and deletion also removes the label from associated messages and threads. The resource is deleted immediately and permanently.\n"]]