Method: users.labels.update
คำขอ HTTP
PUT https://gmail.googleapis.com/gmail/v1/users/{userId}/labels/{id}
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
userId |
string
อีเมลของผู้ใช้ สามารถใช้ค่าพิเศษ me เพื่อระบุผู้ใช้ที่ตรวจสอบสิทธิ์แล้ว
|
id |
string
รหัสของป้ายกำกับที่จะอัปเดต
|
เนื้อหาของคำขอ
เนื้อความของคำขอมีอินสแตนซ์ของ Label
เนื้อหาการตอบกลับ
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีอินสแตนซ์ Label
ขอบเขตการให้สิทธิ์
ต้องมีขอบเขต OAuth อย่างใดอย่างหนึ่งต่อไปนี้
https://mail.google.com/
https://www.googleapis.com/auth/gmail.modify
https://www.googleapis.com/auth/gmail.labels
โปรดดูข้อมูลเพิ่มเติมที่คู่มือการให้สิทธิ์
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-09-05 UTC
[null,null,["อัปเดตล่าสุด 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"]]