Method: users.messages.batchModify
แก้ไขป้ายกำกับของข้อความที่ระบุ
คำขอ HTTP
POST https://gmail.googleapis.com/gmail/v1/users/{userId}/messages/batchModify
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
userId |
string
อีเมลของผู้ใช้ ค่าพิเศษ me สามารถใช้เพื่อระบุผู้ใช้ที่ตรวจสอบสิทธิ์แล้ว
|
เนื้อหาของคำขอ
เนื้อหาของคำขอมีข้อมูลที่มีโครงสร้างต่อไปนี้
การแสดง JSON |
{
"ids": [
string
],
"addLabelIds": [
string
],
"removeLabelIds": [
string
]
} |
ช่อง |
ids[] |
string
รหัสข้อความที่จะแก้ไข มีขีดจำกัดอยู่ที่ 1,000 รหัสต่อคำขอ
|
addLabelIds[] |
string
รายการรหัสป้ายกำกับที่จะเพิ่มในข้อความ
|
removeLabelIds[] |
string
รายการรหัสป้ายกำกับที่จะนำออกจากข้อความ
|
เนื้อหาการตอบกลับ
หากสำเร็จ เนื้อหาการตอบกลับจะว่างเปล่า
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต 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 endpoint allows modification of labels on multiple messages in batches, by adding or removing label IDs."],["Users need to provide message IDs and desired label IDs for adding or removing."],["It uses an HTTP POST request with specific path parameters and a JSON request body structure."],["Successful execution results in an empty response body, indicating the labels were modified."],["Authorization is required, using specified OAuth scopes related to Gmail access and modification."]]],["This describes how to modify labels on Gmail messages via an HTTP POST request to `https://gmail.googleapis.com/gmail/v1/users/{userId}/messages/batchModify`. The `userId` path parameter specifies the user. The request body, in JSON format, includes `ids` (message IDs), `addLabelIds`, and `removeLabelIds` to specify which labels to modify. A maximum of 1000 message IDs is allowed per request. A successful request returns an empty response body and requires specific OAuth scopes.\n"]]