تنشئ هذه الطريقة اشتراكًا في Google Workspace. للتعرّف على كيفية استخدام هذه الطريقة، يُرجى الاطّلاع على مقالة إنشاء اشتراك في Google Workspace.
بالنسبة إلى اشتراك في مورد مستهدف في Chat، يمكنك إنشاء اشتراك على النحو التالي:
تطبيق Chat يشترك في أحداث المساحة التي يكون التطبيق عضوًا فيها من خلال تحديد نطاق تفويض يبدأ بـ
chat.appوالحصول على موافقة المشرف لمرة واحدة. لمزيد من المعلومات، يُرجى الاطّلاع على مقالة التفويض كتطبيق Chat بموافقة المشرف.معاينة المطوّرين: هو تطبيق Chat يشترك في جميع الأحداث في مؤسسة Google Workspace من خلال تحديد نطاق تفويض يبدأ بـ
chat.app.allوالحصول على موافقة المشرف لمرة واحدة. لمزيد من المعلومات، يُرجى الاطّلاع على الاشتراك في جميع أحداث Google Chat في مؤسسة Workspace .يمكن للمستخدم تحديد نطاق تخويل لا يتضمّن
appفي اسمه. لمزيد من المعلومات، يُرجى الاطّلاع على التفويض كمستخدم في Chat.
طلب HTTP
POST https://workspaceevents.googleapis.com/v1beta/subscriptions
يستخدم عنوان URL بنية تحويل الترميز إلى gRPC.
مَعلمات طلب البحث
| المعلمات | |
|---|---|
validateOnly |
اختياريّ. إذا تم ضبطها على |
نص الطلب
يحتوي نص الطلب على مثال Subscription.
نص الاستجابة
إذا كانت الاستجابة ناجحة، سيحتوي نصها على مثال تم إنشاؤه حديثًا Operation.
- يحتوي الحقل
metadataعلى مصفوفة فارغة. - يحتوي الحقل
responseعلى مثيل جديد منSubscription.
نطاقات الأذونات
يجب توفير أحد نطاقات OAuth التالية:
https://www.googleapis.com/auth/chat.spaceshttps://www.googleapis.com/auth/chat.spaces.readonlyhttps://www.googleapis.com/auth/chat.messageshttps://www.googleapis.com/auth/chat.messages.readonlyhttps://www.googleapis.com/auth/chat.messages.reactionshttps://www.googleapis.com/auth/chat.messages.reactions.readonlyhttps://www.googleapis.com/auth/chat.membershipshttps://www.googleapis.com/auth/chat.memberships.readonlyhttps://www.googleapis.com/auth/chat.app.membershipshttps://www.googleapis.com/auth/chat.app.memberships.readonlyhttps://www.googleapis.com/auth/chat.app.all.memberships.readonlyhttps://www.googleapis.com/auth/chat.app.messages.readonlyhttps://www.googleapis.com/auth/chat.app.all.messages.readonlyhttps://www.googleapis.com/auth/chat.app.spaceshttps://www.googleapis.com/auth/chat.app.spaces.readonlyhttps://www.googleapis.com/auth/chat.app.all.spaces.readonlyhttps://www.googleapis.com/auth/chat.app.all.users.readstate.readonlyhttps://www.googleapis.com/auth/meetings.space.createdhttps://www.googleapis.com/auth/meetings.space.readonlyhttps://www.googleapis.com/auth/drivehttps://www.googleapis.com/auth/drive.filehttps://www.googleapis.com/auth/drive.metadatahttps://www.googleapis.com/auth/drive.metadata.readonlyhttps://www.googleapis.com/auth/drive.readonly
لمزيد من المعلومات، يمكنك الاطّلاع على دليل التفويض.