Method: users.labels.delete
برچسب مشخص شده را بلافاصله و برای همیشه حذف می کند و آن را از هر پیام و رشته ای که روی آن اعمال می شود حذف می کند.
درخواست HTTP
DELETE https://gmail.googleapis.com/gmail/v1/users/{userId}/labels/{id}
URL از دستور GRPC Transcoding استفاده می کند.
پارامترهای مسیر
مولفه های |
---|
userId | string آدرس ایمیل کاربر. مقدار ویژه me می تواند برای نشان دادن کاربر تأیید شده استفاده شود. |
id | string شناسه برچسب برای حذف. |
درخواست بدن
بدنه درخواست باید خالی باشد.
بدن پاسخگو
در صورت موفقیت آمیز بودن، بدنه پاسخ خالی است.
محدوده مجوز
به یکی از حوزه های OAuth زیر نیاز دارد:
-
https://mail.google.com/
-
https://www.googleapis.com/auth/gmail.modify
-
https://www.googleapis.com/auth/gmail.labels
برای اطلاعات بیشتر، به راهنمای مجوز مراجعه کنید.
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2024-10-30 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2024-10-30 بهوقت ساعت هماهنگ جهانی."],[[["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"]]