Method: users.threads.modify
แก้ไขป้ายกำกับที่ใช้กับชุดข้อความ ซึ่งจะมีผลกับข้อความทั้งหมดในชุดข้อความ
คำขอ HTTP
POST https://gmail.googleapis.com/gmail/v1/users/{userId}/threads/{id}/modify
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
userId |
string
อีเมลของผู้ใช้ ค่าพิเศษ me สามารถใช้เพื่อระบุผู้ใช้ที่ตรวจสอบสิทธิ์แล้ว
|
id |
string
รหัสของชุดข้อความที่จะแก้ไข
|
เนื้อหาของคำขอ
เนื้อหาของคำขอมีข้อมูลที่มีโครงสร้างต่อไปนี้
การแสดง JSON |
{
"addLabelIds": [
string
],
"removeLabelIds": [
string
]
} |
ช่อง |
addLabelIds[] |
string
รายการรหัสของป้ายกำกับที่จะเพิ่มในชุดข้อความนี้ คุณจะเพิ่มป้ายกำกับได้สูงสุด 100 ป้ายต่อการอัปเดตแต่ละครั้ง
|
removeLabelIds[] |
string
รายการรหัสของป้ายกำกับที่จะนำออกจากชุดข้อความนี้ คุณนำป้ายกำกับออกได้สูงสุด 100 รายการในการอัปเดตแต่ละครั้ง
|
เนื้อหาการตอบกลับ
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีอินสแตนซ์ Thread
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth รายการใดรายการหนึ่งต่อไปนี้
https://mail.google.com/
https://www.googleapis.com/auth/gmail.modify
สำหรับข้อมูลเพิ่มเติม โปรดดูที่คู่มือการให้สิทธิ์
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-09-05 UTC
[null,null,["อัปเดตล่าสุด 2024-09-05 UTC"],[[["This method modifies the labels applied to all messages within a specific thread using the thread ID and user ID."],["The request body allows adding or removing labels by specifying their IDs, with a limit of 100 labels per update."],["Upon successful execution, the API returns a detailed representation of the updated thread, including its properties and metadata."],["Authorization requires specific OAuth scopes, such as 'https://mail.google.com/' or 'https://www.googleapis.com/auth/gmail.modify', to grant access and permissions."]]],["This describes modifying thread labels in Gmail via an HTTP POST request to `https://gmail.googleapis.com/gmail/v1/users/{userId}/threads/{id}/modify`. The request requires `userId` (email or `me`) and `id` (thread ID) path parameters. The request body, in JSON format, includes arrays `addLabelIds` and `removeLabelIds` for adding/removing label IDs (up to 100 each). A successful response returns a Thread instance, and authorization requires specific OAuth scopes.\n"]]