Method: users.labels.delete
Natychmiast i trwale usuwa określoną etykietę oraz usuwa ją ze wszystkich wiadomości i wątków, do których została zastosowana.
Żądanie HTTP
DELETE https://gmail.googleapis.com/gmail/v1/users/{userId}/labels/{id}
Adres URL używa składni transkodowania gRPC.
Parametry ścieżki
Parametry |
userId |
string
Adres e-mail użytkownika. Specjalna wartość me może służyć do wskazania uwierzytelnionego użytkownika.
|
id |
string
Identyfikator etykiety do usunięcia.
|
Treść żądania
Treść żądania musi być pusta.
Treść odpowiedzi
Jeśli operacja się uda, treść odpowiedzi będzie pusta.
Zakresy autoryzacji
Wymaga jednego z tych zakresów OAuth:
https://mail.google.com/
https://www.googleapis.com/auth/gmail.modify
https://www.googleapis.com/auth/gmail.labels
Więcej informacji znajdziesz w przewodniku po autoryzacji.
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2024-09-05 UTC.
[null,null,["Ostatnia aktualizacja: 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"]]