Method: users.labels.update
Aktualizuje określoną etykietę.
Żądanie HTTP
PUT 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 aktualizacji.
|
Treść żądania
Treść żądania zawiera wystąpienie elementu Label
.
Treść odpowiedzi
W przypadku powodzenia treść odpowiedzi obejmuje wystąpienie elementu Label
.
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."],[[["Updates the specified label using a PUT request to the Gmail API."],["Requires providing the user's email address and the label ID as path parameters."],["The request and response bodies utilize the `Label` object to handle label data."],["Authorization is necessary using one of the specified OAuth scopes related to Gmail access and modification."]]],["This document outlines the process to update a label using a `PUT` HTTP request to the Gmail API. The request targets a specific label via `userId` and `id` path parameters. The `userId` can be the email or 'me' for the authenticated user. The request body uses a `Label` instance, and a successful response returns another `Label` instance. Authorization requires one of three specified OAuth scopes. You can use the specified URL and try it with the provided parameters and body.\n"]]