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