Method: subscriptions.create

  • This method creates a Google Workspace subscription and provides instructions on how to use it through a provided link.

  • The request can be previewed without creating a subscription by setting the validateOnly query parameter to true.

  • A successful response includes an Operation object containing the newly created Subscription details.

  • Authorization requires one of the listed OAuth scopes, such as https://www.googleapis.com/auth/chat.spaces or others related to chat, messages, memberships, and meetings, with more information available in the Authorization guide.

Creates a Google Workspace subscription. To learn how to use this method, see Create a Google Workspace subscription.

HTTP request

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

The URL uses gRPC Transcoding syntax.

Query parameters

Parameters
validateOnly

boolean

Optional. If set to true, validates and previews the request, but doesn't create the subscription.

Request body

The request body contains an instance of Subscription.

Response body

If successful, the response body contains a newly created instance of Operation.

  • The metadata field contains an empty array.
  • The response field contains a new instance of Subscription.

Authorization scopes

Requires one of the following OAuth scopes:

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

For more information, see the Authorization guide.