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 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2024-09-05 (حسب التوقيت العالمي المتفَّق عليه)"],[[["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"]]