Method: subscriptions.create

Google Workspace की सदस्यता बनाता है. इस तरीके का इस्तेमाल करने का तरीका जानने के लिए, Google Workspace की सदस्यता बनाना लेख पढ़ें.

Chat टारगेट रिसॉर्स पर सदस्यता के लिए, इस तरह की सदस्यता बनाई जा सकती है:

एचटीटीपी अनुरोध

POST https://workspaceevents.googleapis.com/v1beta/subscriptions

यह यूआरएल, gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल करता है.

क्वेरी पैरामीटर

पैरामीटर
validateOnly

boolean

ज़रूरी नहीं. true पर सेट होने पर, यह अनुरोध की पुष्टि करता है और उसकी झलक दिखाता है. हालांकि, सदस्यता नहीं बनाता है.

अनुरोध का मुख्य भाग

अनुरोध के मुख्य भाग में Subscription का उदाहरण है.

जवाब का मुख्य भाग

अगर अनुरोध पूरा हो जाता है, तो जवाब के मुख्य हिस्से में Operation का नया इंस्टेंस शामिल किया जाता है.

  • metadata फ़ील्ड में खाली कलेक्शन मौजूद है.
  • response फ़ील्ड में Subscription का नया इंस्टेंस मौजूद है.

अनुमति पाने के लिंक

इसके लिए, इनमें से किसी एक OAuth स्कोप की ज़रूरत होती है:

  • https://www.googleapis.com/auth/chat.spaces
  • https://www.googleapis.com/auth/chat.spaces.readonly
  • https://www.googleapis.com/auth/chat.messages
  • https://www.googleapis.com/auth/chat.messages.readonly
  • https://www.googleapis.com/auth/chat.messages.reactions
  • https://www.googleapis.com/auth/chat.messages.reactions.readonly
  • https://www.googleapis.com/auth/chat.memberships
  • https://www.googleapis.com/auth/chat.memberships.readonly
  • https://www.googleapis.com/auth/chat.app.memberships
  • https://www.googleapis.com/auth/chat.app.messages.readonly
  • https://www.googleapis.com/auth/chat.app.spaces
  • https://www.googleapis.com/auth/meetings.space.created
  • https://www.googleapis.com/auth/meetings.space.readonly
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.metadata
  • https://www.googleapis.com/auth/drive.metadata.readonly
  • https://www.googleapis.com/auth/drive.readonly

ज़्यादा जानकारी के लिए, अनुमति देने से जुड़ी गाइड देखें.