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 so erstellen:

  • Eine Chat-App, die Ereignisse in Bereichen abonniert, in denen die App Mitglied ist, indem sie einen Autorisierungsbereich angibt, der mit chat.app beginnt, und eine einmalige Administratorgenehmigung erhält. Weitere Informationen

  • Entwicklervorschau: Eine Chat-App, die alle Ereignisse in einer Google Workspace-Organisation abonniert, indem sie einen Autorisierungsbereich angibt, der mit chat.app.all beginnt, und eine einmalige Administratorgenehmigung einholt. Weitere Informationen

  • Ein Nutzer, indem er einen Autorisierungsbereich angibt, der app nicht im Namen enthält. Weitere Informationen finden Sie unter Als Chat-Nutzer autorisieren.

HTTP-Anfrage

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

Die URL verwendet die Syntax der gRPC-Transcodierung.

Abfrageparameter

Parameter
validateOnly

boolean

Optional. Wenn true festgelegt ist, 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.all.memberships.readonly
  • https://www.googleapis.com/auth/chat.app.messages.readonly
  • https://www.googleapis.com/auth/chat.app.all.messages.readonly
  • https://www.googleapis.com/auth/chat.app.spaces
  • https://www.googleapis.com/auth/chat.app.spaces.readonly
  • https://www.googleapis.com/auth/chat.app.all.spaces.readonly
  • https://www.googleapis.com/auth/chat.app.all.users.readstate.readonly
  • 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

Weitere Informationen finden Sie im Autorisierungsleitfaden.