Method: users.labels.get
Pobiera określoną etykietę.
Żądanie HTTP
GET 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 pobrania.
|
Treść żądania
Treść żądania musi być pusta.
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.readonly
https://www.googleapis.com/auth/gmail.labels
https://www.googleapis.com/auth/gmail.metadata
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."],[[["Retrieves a specific label using the label ID and user's email address."],["Requires an empty request body and returns a `Label` object upon success."],["Needs authorization with specific OAuth scopes like `https://mail.google.com/` or `https://www.googleapis.com/auth/gmail.readonly`."],["Uses a `GET` request to the URL `https://gmail.googleapis.com/gmail/v1/users/{userId}/labels/{id}` with gRPC Transcoding syntax."]]],["This document details how to retrieve a specific label from Gmail. A `GET` request is sent to `https://gmail.googleapis.com/gmail/v1/users/{userId}/labels/{id}`, where `userId` is the user's email or \"me,\" and `id` is the label's ID. The request body must be empty. A successful response will contain label details, and this requires one of five specified OAuth authorization scopes. The guide also references gRPC Transcoding.\n"]]