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
โปรดดูข้อมูลเพิ่มเติมที่คู่มือการให้สิทธิ์
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 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"]]