Method: users.labels.update
Cập nhật nhãn được chỉ định.
Yêu cầu HTTP
PUT https://gmail.googleapis.com/gmail/v1/users/{userId}/labels/{id}
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số đường dẫn
Các tham số |
userId |
string
Địa chỉ email của người dùng. Bạn có thể sử dụng giá trị đặc biệt me để cho biết người dùng đã xác thực.
|
id |
string
Mã của nhãn cần cập nhật.
|
Nội dung yêu cầu
Nội dung yêu cầu chứa một bản sao của Label
.
Nội dung phản hồi
Nếu thành công, nội dung phản hồi sẽ chứa một phiên bản của Label
.
Phạm vi uỷ quyền
Yêu cầu một trong các phạm vi OAuth sau:
https://mail.google.com/
https://www.googleapis.com/auth/gmail.modify
https://www.googleapis.com/auth/gmail.labels
Để biết thêm thông tin, hãy xem Hướng dẫn uỷ quyền.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2024-09-05 UTC.
[null,null,["Cập nhật lần gần đây nhất: 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"]]