Class SpacesResource.MembersResource.CreateRequest
Creates a membership for the calling Chat app, a user, or a Google Group. Creating memberships for other
Chat apps isn't supported. When creating a membership, if the specified member has their auto-accept
policy turned off, then they're invited, and must accept the space invitation before joining. Otherwise,
creating a membership adds the member directly to the specified space. Supports the following types of
authentication: - App
authentication with
administrator approval in Developer
Preview and the authorization scope: -
https://www.googleapis.com/auth/chat.app.memberships - User
authentication with one
of the following authorization scopes: - https://www.googleapis.com/auth/chat.memberships -
https://www.googleapis.com/auth/chat.memberships.app (to add the calling app to the space) -
https://www.googleapis.com/auth/chat.import (import mode spaces only) - User authentication grants
administrator privileges when an administrator account authenticates, use_admin_access is true, and
the following authorization scope is used: - https://www.googleapis.com/auth/chat.admin.memberships
For example usage, see: - Invite or add a user to a
space. - Invite or
add a Google Group to a
space. - Add the
Chat app to a
space.
Inheritance
Inherited Members
Namespace: Google.Apis.HangoutsChat.v1
Assembly: Google.Apis.HangoutsChat.v1.dll
Syntax
public class SpacesResource.MembersResource.CreateRequest : HangoutsChatBaseServiceRequest<Membership>, IClientServiceRequest<Membership>, IClientServiceRequest
Constructors
CreateRequest(IClientService, Membership, string)
Constructs a new Create request.
Declaration
public CreateRequest(IClientService service, Membership body, string parent)
Parameters
| Type | Name | Description |
|---|---|---|
| IClientService | service | |
| Membership | body | |
| string | parent |
Properties
HttpMethod
Gets the HTTP method.
Declaration
public override string HttpMethod { get; }
Property Value
| Type | Description |
|---|---|
| string |
Overrides
MethodName
Gets the method name.
Declaration
public override string MethodName { get; }
Property Value
| Type | Description |
|---|---|
| string |
Overrides
Parent
Required. The resource name of the space for which to create the membership. Format: spaces/{space}
Declaration
[RequestParameter("parent", RequestParameterType.Path)]
public virtual string Parent { get; }
Property Value
| Type | Description |
|---|---|
| string |
RestPath
Gets the REST path.
Declaration
public override string RestPath { get; }
Property Value
| Type | Description |
|---|---|
| string |
Overrides
UseAdminAccess
Optional. When true, the method runs using the user's Google Workspace administrator privileges.
The calling user must be a Google Workspace administrator with the manage chat and spaces
conversations privilege. Requires the
chat.admin.memberships OAuth 2.0
scope.
Creating app memberships or creating memberships for users outside the administrator's Google
Workspace organization isn't supported using admin access.
Declaration
[RequestParameter("useAdminAccess", RequestParameterType.Query)]
public virtual bool? UseAdminAccess { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? |
Methods
GetBody()
Returns the body of the request.
Declaration
protected override object GetBody()
Returns
| Type | Description |
|---|---|
| object |
Overrides
InitParameters()
Initializes Create parameter list.
Declaration
protected override void InitParameters()