Method: subscriptions.create

Erstellt ein Google Workspace-Abo. Informationen zur Verwendung dieser Methode finden Sie unter Google Workspace-Abo erstellen.

Für ein Abo für eine Chat-Zielressource können Sie ein Abo als Folgendes erstellen:

HTTP-Anfrage

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

Die URL verwendet die Syntax der gRPC-Transcodierung.

Abfrageparameter

Parameter
validateOnly

boolean

Optional. Wenn auf true festgelegt, wird die Anfrage validiert und in der Vorschau angezeigt, aber das Abo wird nicht erstellt.

Anfragetext

Der Anfragetext enthält eine Instanz von Subscription.

Antworttext

Wenn der Vorgang erfolgreich abgeschlossen wurde, enthält der Antworttext eine neu erstellte Instanz von Operation.

  • Das Feld metadata enthält ein leeres Array.
  • Das Feld response enthält eine neue Instanz von Subscription.

Autorisierungsbereiche

Erfordert einen der folgenden OAuth-Bereiche:

  • 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.memberships.readonly
  • https://www.googleapis.com/auth/chat.app.messages.readonly
  • https://www.googleapis.com/auth/chat.app.spaces
  • https://www.googleapis.com/auth/chat.app.spaces.readonly
  • https://www.googleapis.com/auth/meetings.space.created
  • https://www.googleapis.com/auth/meetings.space.readonly

Weitere Informationen finden Sie im Autorisierungsleitfaden.