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
מידע נוסף זמין במדריך להרשאות.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 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"]]