Method: users.labels.get
הפונקציה מקבלת את התווית שצוינה.
בקשת HTTP
GET https://gmail.googleapis.com/gmail/v1/users/{userId}/labels/{id}
בכתובת ה-URL נעשה שימוש בתחביר המרת gRPC.
פרמטרים של נתיב
פרמטרים |
userId |
string
זוהי כתובת האימייל של המשתמש. ניתן להשתמש בערך המיוחד me כדי לציין את המשתמש המאומת.
|
id |
string
מזהה התווית שיש לאחזר.
|
גוף הבקשה
גוף הבקשה חייב להיות ריק.
גוף התגובה
אם הפעולה בוצעה ללא שגיאות, גוף התגובה יכלול מופע של Label
.
היקפי הרשאות
כדי להשתמש בתכונה הזו יש צורך באחד מההיקפים הבאים של 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
למידע נוסף, ניתן לעיין במדריך ההרשאות.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2024-09-05 (שעון UTC).
[null,null,["עדכון אחרון: 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"]]