Creates a space and adds users to it. If users can't be added directly, sends them invitations to join. Spaces with threaded replies, and spaces with guest access are not supported.
Requires user authentication and the chat.spaces.create
scope.
HTTP request
POST https://chat.googleapis.com/v1/spaces:setup
The URL uses gRPC Transcoding syntax.
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "space": { object ( |
Fields | |
---|---|
space |
Required. The To create a space, set To create a group chat, set To create a 1:1 conversation between humans, set To create an 1:1 conversation between a human and a Chat app set |
requestId |
Optional. A unique identifier for this request. A random UUID is recommended. This request is only idempotent if a |
memberships[] |
Optional. The initial set of in-domain users or groups invited to join the space. The set currently allows 20 memberships maximum. The Required for Required for Required for Not supported: Inviting out-of-domain users, or adding other Chat apps. |
Response body
If successful, the response body contains an instance of Space
.
Authorization Scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/chat.spaces.create
For more information, see the Authorization guide.