Method: users.labels.create
طلب HTTP
POST https://gmail.googleapis.com/gmail/v1/users/{userId}/labels
يستخدِم عنوان URL بنية تحويل ترميز gRPC.
مَعلمات المسار
المَعلمات |
userId |
string
عنوان البريد الإلكتروني للمستخدم يمكن استخدام القيمة الخاصة me للإشارة إلى المستخدم الذي تمت مصادقته.
|
نص الطلب
يحتوي نص الطلب على مثال Label
.
نص الاستجابة
إذا كانت الاستجابة ناجحة، يحتوي نص الاستجابة على مثيل Label
تم إنشاؤه حديثًا.
نطاقات التفويض
يتطلب استخدام أحد نطاقات OAuth التالية:
https://mail.google.com/
https://www.googleapis.com/auth/gmail.modify
https://www.googleapis.com/auth/gmail.labels
لمزيد من المعلومات، راجِع دليل التفويض.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2024-09-05 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2024-09-05 (حسب التوقيت العالمي المتفَّق عليه)"],[[["Creates a new label for a user's Gmail account using an HTTP POST request."],["Requires providing the user's email address (or `me` for the authenticated user) as a path parameter."],["The request body should contain details of the new label, and a successful response will return the created label details."],["Requires specific authorization scopes, such as `https://mail.google.com/` or `https://www.googleapis.com/auth/gmail.labels`, for access."]]],["This documentation details the process for creating a new label via the Gmail API. A `POST` request is sent to `https://gmail.googleapis.com/gmail/v1/users/{userId}/labels`, with the `userId` path parameter specifying the user. The request body must include a `Label` instance. Successful requests return the newly created `Label` in the response body. Authorization requires specific OAuth scopes, including `https://mail.google.com/` and others. The operation can be tested using the `Try it!` function.\n"]]