Show / Hide Table of Contents

Class ChatService.ChatServiceClient

Client for ChatService

Inheritance
object
ClientBase
ClientBase<ChatService.ChatServiceClient>
ChatService.ChatServiceClient
Inherited Members
ClientBase<ChatService.ChatServiceClient>.WithHost(string)
ClientBase.CallInvoker
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ToString()
Namespace: Google.Apps.Chat.V1
Assembly: Google.Apps.Chat.V1.dll
Syntax
public class ChatService.ChatServiceClient : ClientBase<ChatService.ChatServiceClient>

Constructors

ChatServiceClient()

Protected parameterless constructor to allow creation of test doubles.

Declaration
protected ChatServiceClient()

ChatServiceClient(CallInvoker)

Creates a new client for ChatService that uses a custom CallInvoker.

Declaration
public ChatServiceClient(CallInvoker callInvoker)
Parameters
Type Name Description
CallInvoker callInvoker

The callInvoker to use to make remote calls.

ChatServiceClient(ChannelBase)

Creates a new client for ChatService

Declaration
public ChatServiceClient(ChannelBase channel)
Parameters
Type Name Description
ChannelBase channel

The channel to use to make remote calls.

ChatServiceClient(ClientBaseConfiguration)

Protected constructor to allow creation of configured clients.

Declaration
protected ChatServiceClient(ClientBase.ClientBaseConfiguration configuration)
Parameters
Type Name Description
ClientBase.ClientBaseConfiguration configuration

The client configuration.

Methods

CompleteImportSpace(CompleteImportSpaceRequest, CallOptions)

Completes the import process for the specified space and makes it visible to users.

Requires app authentication and domain-wide delegation. For more information, see Authorize Google Chat apps to import data.

Declaration
public virtual CompleteImportSpaceResponse CompleteImportSpace(CompleteImportSpaceRequest request, CallOptions options)
Parameters
Type Name Description
CompleteImportSpaceRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
CompleteImportSpaceResponse

The response received from the server.

CompleteImportSpace(CompleteImportSpaceRequest, Metadata, DateTime?, CancellationToken)

Completes the import process for the specified space and makes it visible to users.

Requires app authentication and domain-wide delegation. For more information, see Authorize Google Chat apps to import data.

Declaration
public virtual CompleteImportSpaceResponse CompleteImportSpace(CompleteImportSpaceRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
CompleteImportSpaceRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
CompleteImportSpaceResponse

The response received from the server.

CompleteImportSpaceAsync(CompleteImportSpaceRequest, CallOptions)

Completes the import process for the specified space and makes it visible to users.

Requires app authentication and domain-wide delegation. For more information, see Authorize Google Chat apps to import data.

Declaration
public virtual AsyncUnaryCall<CompleteImportSpaceResponse> CompleteImportSpaceAsync(CompleteImportSpaceRequest request, CallOptions options)
Parameters
Type Name Description
CompleteImportSpaceRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<CompleteImportSpaceResponse>

The call object.

CompleteImportSpaceAsync(CompleteImportSpaceRequest, Metadata, DateTime?, CancellationToken)

Completes the import process for the specified space and makes it visible to users.

Requires app authentication and domain-wide delegation. For more information, see Authorize Google Chat apps to import data.

Declaration
public virtual AsyncUnaryCall<CompleteImportSpaceResponse> CompleteImportSpaceAsync(CompleteImportSpaceRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
CompleteImportSpaceRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<CompleteImportSpaceResponse>

The call object.

CreateCustomEmoji(CreateCustomEmojiRequest, CallOptions)

Creates a custom emoji.

Custom emojis are only available for Google Workspace accounts, and the administrator must turn custom emojis on for the organization. For more information, see Learn about custom emojis in Google Chat and Manage custom emoji permissions.

Requires user authentication.

Declaration
public virtual CustomEmoji CreateCustomEmoji(CreateCustomEmojiRequest request, CallOptions options)
Parameters
Type Name Description
CreateCustomEmojiRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
CustomEmoji

The response received from the server.

CreateCustomEmoji(CreateCustomEmojiRequest, Metadata, DateTime?, CancellationToken)

Creates a custom emoji.

Custom emojis are only available for Google Workspace accounts, and the administrator must turn custom emojis on for the organization. For more information, see Learn about custom emojis in Google Chat and Manage custom emoji permissions.

Requires user authentication.

Declaration
public virtual CustomEmoji CreateCustomEmoji(CreateCustomEmojiRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
CreateCustomEmojiRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
CustomEmoji

The response received from the server.

CreateCustomEmojiAsync(CreateCustomEmojiRequest, CallOptions)

Creates a custom emoji.

Custom emojis are only available for Google Workspace accounts, and the administrator must turn custom emojis on for the organization. For more information, see Learn about custom emojis in Google Chat and Manage custom emoji permissions.

Requires user authentication.

Declaration
public virtual AsyncUnaryCall<CustomEmoji> CreateCustomEmojiAsync(CreateCustomEmojiRequest request, CallOptions options)
Parameters
Type Name Description
CreateCustomEmojiRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<CustomEmoji>

The call object.

CreateCustomEmojiAsync(CreateCustomEmojiRequest, Metadata, DateTime?, CancellationToken)

Creates a custom emoji.

Custom emojis are only available for Google Workspace accounts, and the administrator must turn custom emojis on for the organization. For more information, see Learn about custom emojis in Google Chat and Manage custom emoji permissions.

Requires user authentication.

Declaration
public virtual AsyncUnaryCall<CustomEmoji> CreateCustomEmojiAsync(CreateCustomEmojiRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
CreateCustomEmojiRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<CustomEmoji>

The call object.

CreateMembership(CreateMembershipRequest, CallOptions)

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

  • User authentication You can authenticate and authorize this method with administrator privileges by setting the use_admin_access field in the request.

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.

Declaration
public virtual Membership CreateMembership(CreateMembershipRequest request, CallOptions options)
Parameters
Type Name Description
CreateMembershipRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
Membership

The response received from the server.

CreateMembership(CreateMembershipRequest, Metadata, DateTime?, CancellationToken)

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

  • User authentication You can authenticate and authorize this method with administrator privileges by setting the use_admin_access field in the request.

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.

Declaration
public virtual Membership CreateMembership(CreateMembershipRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
CreateMembershipRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
Membership

The response received from the server.

CreateMembershipAsync(CreateMembershipRequest, CallOptions)

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

  • User authentication You can authenticate and authorize this method with administrator privileges by setting the use_admin_access field in the request.

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.

Declaration
public virtual AsyncUnaryCall<Membership> CreateMembershipAsync(CreateMembershipRequest request, CallOptions options)
Parameters
Type Name Description
CreateMembershipRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<Membership>

The call object.

CreateMembershipAsync(CreateMembershipRequest, Metadata, DateTime?, CancellationToken)

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

  • User authentication You can authenticate and authorize this method with administrator privileges by setting the use_admin_access field in the request.

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.

Declaration
public virtual AsyncUnaryCall<Membership> CreateMembershipAsync(CreateMembershipRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
CreateMembershipRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<Membership>

The call object.

CreateMessage(CreateMessageRequest, CallOptions)

Creates a message in a Google Chat space. For an example, see Send a message.

The create() method requires either user authentication or app authentication. Chat attributes the message sender differently depending on the type of authentication that you use in your request.

The following image shows how Chat attributes a message when you use app authentication. Chat displays the Chat app as the message sender. The content of the message can contain text (text), cards (cardsV2), and accessory widgets (accessoryWidgets).

Message sent with app
authentication

The following image shows how Chat attributes a message when you use user authentication. Chat displays the user as the message sender and attributes the Chat app to the message by displaying its name. The content of message can only contain text (text).

Message sent with user
authentication

The maximum message size, including the message contents, is 32,000 bytes.

For webhook requests, the response doesn't contain the full message. The response only populates the name and thread.name fields in addition to the information that was in the request.

Declaration
public virtual Message CreateMessage(CreateMessageRequest request, CallOptions options)
Parameters
Type Name Description
CreateMessageRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
Message

The response received from the server.

CreateMessage(CreateMessageRequest, Metadata, DateTime?, CancellationToken)

Creates a message in a Google Chat space. For an example, see Send a message.

The create() method requires either user authentication or app authentication. Chat attributes the message sender differently depending on the type of authentication that you use in your request.

The following image shows how Chat attributes a message when you use app authentication. Chat displays the Chat app as the message sender. The content of the message can contain text (text), cards (cardsV2), and accessory widgets (accessoryWidgets).

Message sent with app
authentication

The following image shows how Chat attributes a message when you use user authentication. Chat displays the user as the message sender and attributes the Chat app to the message by displaying its name. The content of message can only contain text (text).

Message sent with user
authentication

The maximum message size, including the message contents, is 32,000 bytes.

For webhook requests, the response doesn't contain the full message. The response only populates the name and thread.name fields in addition to the information that was in the request.

Declaration
public virtual Message CreateMessage(CreateMessageRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
CreateMessageRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
Message

The response received from the server.

CreateMessageAsync(CreateMessageRequest, CallOptions)

Creates a message in a Google Chat space. For an example, see Send a message.

The create() method requires either user authentication or app authentication. Chat attributes the message sender differently depending on the type of authentication that you use in your request.

The following image shows how Chat attributes a message when you use app authentication. Chat displays the Chat app as the message sender. The content of the message can contain text (text), cards (cardsV2), and accessory widgets (accessoryWidgets).

Message sent with app
authentication

The following image shows how Chat attributes a message when you use user authentication. Chat displays the user as the message sender and attributes the Chat app to the message by displaying its name. The content of message can only contain text (text).

Message sent with user
authentication

The maximum message size, including the message contents, is 32,000 bytes.

For webhook requests, the response doesn't contain the full message. The response only populates the name and thread.name fields in addition to the information that was in the request.

Declaration
public virtual AsyncUnaryCall<Message> CreateMessageAsync(CreateMessageRequest request, CallOptions options)
Parameters
Type Name Description
CreateMessageRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<Message>

The call object.

CreateMessageAsync(CreateMessageRequest, Metadata, DateTime?, CancellationToken)

Creates a message in a Google Chat space. For an example, see Send a message.

The create() method requires either user authentication or app authentication. Chat attributes the message sender differently depending on the type of authentication that you use in your request.

The following image shows how Chat attributes a message when you use app authentication. Chat displays the Chat app as the message sender. The content of the message can contain text (text), cards (cardsV2), and accessory widgets (accessoryWidgets).

Message sent with app
authentication

The following image shows how Chat attributes a message when you use user authentication. Chat displays the user as the message sender and attributes the Chat app to the message by displaying its name. The content of message can only contain text (text).

Message sent with user
authentication

The maximum message size, including the message contents, is 32,000 bytes.

For webhook requests, the response doesn't contain the full message. The response only populates the name and thread.name fields in addition to the information that was in the request.

Declaration
public virtual AsyncUnaryCall<Message> CreateMessageAsync(CreateMessageRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
CreateMessageRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<Message>

The call object.

CreateReaction(CreateReactionRequest, CallOptions)

Creates a reaction and adds it to a message. For an example, see Add a reaction to a message.

Requires user authentication.

Declaration
public virtual Reaction CreateReaction(CreateReactionRequest request, CallOptions options)
Parameters
Type Name Description
CreateReactionRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
Reaction

The response received from the server.

CreateReaction(CreateReactionRequest, Metadata, DateTime?, CancellationToken)

Creates a reaction and adds it to a message. For an example, see Add a reaction to a message.

Requires user authentication.

Declaration
public virtual Reaction CreateReaction(CreateReactionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
CreateReactionRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
Reaction

The response received from the server.

CreateReactionAsync(CreateReactionRequest, CallOptions)

Creates a reaction and adds it to a message. For an example, see Add a reaction to a message.

Requires user authentication.

Declaration
public virtual AsyncUnaryCall<Reaction> CreateReactionAsync(CreateReactionRequest request, CallOptions options)
Parameters
Type Name Description
CreateReactionRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<Reaction>

The call object.

CreateReactionAsync(CreateReactionRequest, Metadata, DateTime?, CancellationToken)

Creates a reaction and adds it to a message. For an example, see Add a reaction to a message.

Requires user authentication.

Declaration
public virtual AsyncUnaryCall<Reaction> CreateReactionAsync(CreateReactionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
CreateReactionRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<Reaction>

The call object.

CreateSpace(CreateSpaceRequest, CallOptions)

Creates a space with no members. Can be used to create a named space, or a group chat in Import mode. For an example, see Create a space.

If you receive the error message ALREADY_EXISTS when creating a space, try a different displayName. An existing space within the Google Workspace organization might already use this display name.

Supports the following types of authentication:

  • App authentication with administrator approval in Developer Preview

  • User authentication

When authenticating as an app, the space.customer field must be set in the request.

Declaration
public virtual Space CreateSpace(CreateSpaceRequest request, CallOptions options)
Parameters
Type Name Description
CreateSpaceRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
Space

The response received from the server.

CreateSpace(CreateSpaceRequest, Metadata, DateTime?, CancellationToken)

Creates a space with no members. Can be used to create a named space, or a group chat in Import mode. For an example, see Create a space.

If you receive the error message ALREADY_EXISTS when creating a space, try a different displayName. An existing space within the Google Workspace organization might already use this display name.

Supports the following types of authentication:

  • App authentication with administrator approval in Developer Preview

  • User authentication

When authenticating as an app, the space.customer field must be set in the request.

Declaration
public virtual Space CreateSpace(CreateSpaceRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
CreateSpaceRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
Space

The response received from the server.

CreateSpaceAsync(CreateSpaceRequest, CallOptions)

Creates a space with no members. Can be used to create a named space, or a group chat in Import mode. For an example, see Create a space.

If you receive the error message ALREADY_EXISTS when creating a space, try a different displayName. An existing space within the Google Workspace organization might already use this display name.

Supports the following types of authentication:

  • App authentication with administrator approval in Developer Preview

  • User authentication

When authenticating as an app, the space.customer field must be set in the request.

Declaration
public virtual AsyncUnaryCall<Space> CreateSpaceAsync(CreateSpaceRequest request, CallOptions options)
Parameters
Type Name Description
CreateSpaceRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<Space>

The call object.

CreateSpaceAsync(CreateSpaceRequest, Metadata, DateTime?, CancellationToken)

Creates a space with no members. Can be used to create a named space, or a group chat in Import mode. For an example, see Create a space.

If you receive the error message ALREADY_EXISTS when creating a space, try a different displayName. An existing space within the Google Workspace organization might already use this display name.

Supports the following types of authentication:

  • App authentication with administrator approval in Developer Preview

  • User authentication

When authenticating as an app, the space.customer field must be set in the request.

Declaration
public virtual AsyncUnaryCall<Space> CreateSpaceAsync(CreateSpaceRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
CreateSpaceRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<Space>

The call object.

DeleteCustomEmoji(DeleteCustomEmojiRequest, CallOptions)

Deletes a custom emoji. By default, users can only delete custom emoji they created. Emoji managers assigned by the administrator can delete any custom emoji in the organization. See Learn about custom emojis in Google Chat.

Custom emojis are only available for Google Workspace accounts, and the administrator must turn custom emojis on for the organization. For more information, see Learn about custom emojis in Google Chat and Manage custom emoji permissions.

Requires user authentication.

Declaration
public virtual Empty DeleteCustomEmoji(DeleteCustomEmojiRequest request, CallOptions options)
Parameters
Type Name Description
DeleteCustomEmojiRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
Empty

The response received from the server.

DeleteCustomEmoji(DeleteCustomEmojiRequest, Metadata, DateTime?, CancellationToken)

Deletes a custom emoji. By default, users can only delete custom emoji they created. Emoji managers assigned by the administrator can delete any custom emoji in the organization. See Learn about custom emojis in Google Chat.

Custom emojis are only available for Google Workspace accounts, and the administrator must turn custom emojis on for the organization. For more information, see Learn about custom emojis in Google Chat and Manage custom emoji permissions.

Requires user authentication.

Declaration
public virtual Empty DeleteCustomEmoji(DeleteCustomEmojiRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
DeleteCustomEmojiRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
Empty

The response received from the server.

DeleteCustomEmojiAsync(DeleteCustomEmojiRequest, CallOptions)

Deletes a custom emoji. By default, users can only delete custom emoji they created. Emoji managers assigned by the administrator can delete any custom emoji in the organization. See Learn about custom emojis in Google Chat.

Custom emojis are only available for Google Workspace accounts, and the administrator must turn custom emojis on for the organization. For more information, see Learn about custom emojis in Google Chat and Manage custom emoji permissions.

Requires user authentication.

Declaration
public virtual AsyncUnaryCall<Empty> DeleteCustomEmojiAsync(DeleteCustomEmojiRequest request, CallOptions options)
Parameters
Type Name Description
DeleteCustomEmojiRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<Empty>

The call object.

DeleteCustomEmojiAsync(DeleteCustomEmojiRequest, Metadata, DateTime?, CancellationToken)

Deletes a custom emoji. By default, users can only delete custom emoji they created. Emoji managers assigned by the administrator can delete any custom emoji in the organization. See Learn about custom emojis in Google Chat.

Custom emojis are only available for Google Workspace accounts, and the administrator must turn custom emojis on for the organization. For more information, see Learn about custom emojis in Google Chat and Manage custom emoji permissions.

Requires user authentication.

Declaration
public virtual AsyncUnaryCall<Empty> DeleteCustomEmojiAsync(DeleteCustomEmojiRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
DeleteCustomEmojiRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<Empty>

The call object.

DeleteMembership(DeleteMembershipRequest, CallOptions)

Deletes a membership. For an example, see Remove a user or a Google Chat app from a space.

Supports the following types of authentication:

  • App authentication with administrator approval in Developer Preview

  • User authentication You can authenticate and authorize this method with administrator privileges by setting the use_admin_access field in the request.

Declaration
public virtual Membership DeleteMembership(DeleteMembershipRequest request, CallOptions options)
Parameters
Type Name Description
DeleteMembershipRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
Membership

The response received from the server.

DeleteMembership(DeleteMembershipRequest, Metadata, DateTime?, CancellationToken)

Deletes a membership. For an example, see Remove a user or a Google Chat app from a space.

Supports the following types of authentication:

  • App authentication with administrator approval in Developer Preview

  • User authentication You can authenticate and authorize this method with administrator privileges by setting the use_admin_access field in the request.

Declaration
public virtual Membership DeleteMembership(DeleteMembershipRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
DeleteMembershipRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
Membership

The response received from the server.

DeleteMembershipAsync(DeleteMembershipRequest, CallOptions)

Deletes a membership. For an example, see Remove a user or a Google Chat app from a space.

Supports the following types of authentication:

  • App authentication with administrator approval in Developer Preview

  • User authentication You can authenticate and authorize this method with administrator privileges by setting the use_admin_access field in the request.

Declaration
public virtual AsyncUnaryCall<Membership> DeleteMembershipAsync(DeleteMembershipRequest request, CallOptions options)
Parameters
Type Name Description
DeleteMembershipRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<Membership>

The call object.

DeleteMembershipAsync(DeleteMembershipRequest, Metadata, DateTime?, CancellationToken)

Deletes a membership. For an example, see Remove a user or a Google Chat app from a space.

Supports the following types of authentication:

  • App authentication with administrator approval in Developer Preview

  • User authentication You can authenticate and authorize this method with administrator privileges by setting the use_admin_access field in the request.

Declaration
public virtual AsyncUnaryCall<Membership> DeleteMembershipAsync(DeleteMembershipRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
DeleteMembershipRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<Membership>

The call object.

DeleteMessage(DeleteMessageRequest, CallOptions)

Deletes a message. For an example, see Delete a message.

Supports the following types of authentication:

  • App authentication

  • User authentication

When using app authentication, requests can only delete messages created by the calling Chat app.

Declaration
public virtual Empty DeleteMessage(DeleteMessageRequest request, CallOptions options)
Parameters
Type Name Description
DeleteMessageRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
Empty

The response received from the server.

DeleteMessage(DeleteMessageRequest, Metadata, DateTime?, CancellationToken)

Deletes a message. For an example, see Delete a message.

Supports the following types of authentication:

  • App authentication

  • User authentication

When using app authentication, requests can only delete messages created by the calling Chat app.

Declaration
public virtual Empty DeleteMessage(DeleteMessageRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
DeleteMessageRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
Empty

The response received from the server.

DeleteMessageAsync(DeleteMessageRequest, CallOptions)

Deletes a message. For an example, see Delete a message.

Supports the following types of authentication:

  • App authentication

  • User authentication

When using app authentication, requests can only delete messages created by the calling Chat app.

Declaration
public virtual AsyncUnaryCall<Empty> DeleteMessageAsync(DeleteMessageRequest request, CallOptions options)
Parameters
Type Name Description
DeleteMessageRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<Empty>

The call object.

DeleteMessageAsync(DeleteMessageRequest, Metadata, DateTime?, CancellationToken)

Deletes a message. For an example, see Delete a message.

Supports the following types of authentication:

  • App authentication

  • User authentication

When using app authentication, requests can only delete messages created by the calling Chat app.

Declaration
public virtual AsyncUnaryCall<Empty> DeleteMessageAsync(DeleteMessageRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
DeleteMessageRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<Empty>

The call object.

DeleteReaction(DeleteReactionRequest, CallOptions)

Deletes a reaction to a message. For an example, see Delete a reaction.

Requires user authentication.

Declaration
public virtual Empty DeleteReaction(DeleteReactionRequest request, CallOptions options)
Parameters
Type Name Description
DeleteReactionRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
Empty

The response received from the server.

DeleteReaction(DeleteReactionRequest, Metadata, DateTime?, CancellationToken)

Deletes a reaction to a message. For an example, see Delete a reaction.

Requires user authentication.

Declaration
public virtual Empty DeleteReaction(DeleteReactionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
DeleteReactionRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
Empty

The response received from the server.

DeleteReactionAsync(DeleteReactionRequest, CallOptions)

Deletes a reaction to a message. For an example, see Delete a reaction.

Requires user authentication.

Declaration
public virtual AsyncUnaryCall<Empty> DeleteReactionAsync(DeleteReactionRequest request, CallOptions options)
Parameters
Type Name Description
DeleteReactionRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<Empty>

The call object.

DeleteReactionAsync(DeleteReactionRequest, Metadata, DateTime?, CancellationToken)

Deletes a reaction to a message. For an example, see Delete a reaction.

Requires user authentication.

Declaration
public virtual AsyncUnaryCall<Empty> DeleteReactionAsync(DeleteReactionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
DeleteReactionRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<Empty>

The call object.

DeleteSpace(DeleteSpaceRequest, CallOptions)

Deletes a named space. Always performs a cascading delete, which means that the space's child resources—like messages posted in the space and memberships in the space—are also deleted. For an example, see Delete a space.

Supports the following types of authentication:

  • App authentication with administrator approval in Developer Preview

  • User authentication You can authenticate and authorize this method with administrator privileges by setting the use_admin_access field in the request.

Declaration
public virtual Empty DeleteSpace(DeleteSpaceRequest request, CallOptions options)
Parameters
Type Name Description
DeleteSpaceRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
Empty

The response received from the server.

DeleteSpace(DeleteSpaceRequest, Metadata, DateTime?, CancellationToken)

Deletes a named space. Always performs a cascading delete, which means that the space's child resources—like messages posted in the space and memberships in the space—are also deleted. For an example, see Delete a space.

Supports the following types of authentication:

  • App authentication with administrator approval in Developer Preview

  • User authentication You can authenticate and authorize this method with administrator privileges by setting the use_admin_access field in the request.

Declaration
public virtual Empty DeleteSpace(DeleteSpaceRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
DeleteSpaceRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
Empty

The response received from the server.

DeleteSpaceAsync(DeleteSpaceRequest, CallOptions)

Deletes a named space. Always performs a cascading delete, which means that the space's child resources—like messages posted in the space and memberships in the space—are also deleted. For an example, see Delete a space.

Supports the following types of authentication:

  • App authentication with administrator approval in Developer Preview

  • User authentication You can authenticate and authorize this method with administrator privileges by setting the use_admin_access field in the request.

Declaration
public virtual AsyncUnaryCall<Empty> DeleteSpaceAsync(DeleteSpaceRequest request, CallOptions options)
Parameters
Type Name Description
DeleteSpaceRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<Empty>

The call object.

DeleteSpaceAsync(DeleteSpaceRequest, Metadata, DateTime?, CancellationToken)

Deletes a named space. Always performs a cascading delete, which means that the space's child resources—like messages posted in the space and memberships in the space—are also deleted. For an example, see Delete a space.

Supports the following types of authentication:

  • App authentication with administrator approval in Developer Preview

  • User authentication You can authenticate and authorize this method with administrator privileges by setting the use_admin_access field in the request.

Declaration
public virtual AsyncUnaryCall<Empty> DeleteSpaceAsync(DeleteSpaceRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
DeleteSpaceRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<Empty>

The call object.

FindDirectMessage(FindDirectMessageRequest, CallOptions)

Returns the existing direct message with the specified user. If no direct message space is found, returns a 404 NOT_FOUND error. For an example, see Find a direct message.

With app authentication, returns the direct message space between the specified user and the calling Chat app.

With user authentication, returns the direct message space between the specified user and the authenticated user.

// Supports the following types of authentication:

  • App authentication

  • User authentication

Declaration
public virtual Space FindDirectMessage(FindDirectMessageRequest request, CallOptions options)
Parameters
Type Name Description
FindDirectMessageRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
Space

The response received from the server.

FindDirectMessage(FindDirectMessageRequest, Metadata, DateTime?, CancellationToken)

Returns the existing direct message with the specified user. If no direct message space is found, returns a 404 NOT_FOUND error. For an example, see Find a direct message.

With app authentication, returns the direct message space between the specified user and the calling Chat app.

With user authentication, returns the direct message space between the specified user and the authenticated user.

// Supports the following types of authentication:

  • App authentication

  • User authentication

Declaration
public virtual Space FindDirectMessage(FindDirectMessageRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
FindDirectMessageRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
Space

The response received from the server.

FindDirectMessageAsync(FindDirectMessageRequest, CallOptions)

Returns the existing direct message with the specified user. If no direct message space is found, returns a 404 NOT_FOUND error. For an example, see Find a direct message.

With app authentication, returns the direct message space between the specified user and the calling Chat app.

With user authentication, returns the direct message space between the specified user and the authenticated user.

// Supports the following types of authentication:

  • App authentication

  • User authentication

Declaration
public virtual AsyncUnaryCall<Space> FindDirectMessageAsync(FindDirectMessageRequest request, CallOptions options)
Parameters
Type Name Description
FindDirectMessageRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<Space>

The call object.

FindDirectMessageAsync(FindDirectMessageRequest, Metadata, DateTime?, CancellationToken)

Returns the existing direct message with the specified user. If no direct message space is found, returns a 404 NOT_FOUND error. For an example, see Find a direct message.

With app authentication, returns the direct message space between the specified user and the calling Chat app.

With user authentication, returns the direct message space between the specified user and the authenticated user.

// Supports the following types of authentication:

  • App authentication

  • User authentication

Declaration
public virtual AsyncUnaryCall<Space> FindDirectMessageAsync(FindDirectMessageRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
FindDirectMessageRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<Space>

The call object.

GetAttachment(GetAttachmentRequest, CallOptions)

Gets the metadata of a message attachment. The attachment data is fetched using the media API. For an example, see Get metadata about a message attachment. Requires app authentication.

Declaration
public virtual Attachment GetAttachment(GetAttachmentRequest request, CallOptions options)
Parameters
Type Name Description
GetAttachmentRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
Attachment

The response received from the server.

GetAttachment(GetAttachmentRequest, Metadata, DateTime?, CancellationToken)

Gets the metadata of a message attachment. The attachment data is fetched using the media API. For an example, see Get metadata about a message attachment. Requires app authentication.

Declaration
public virtual Attachment GetAttachment(GetAttachmentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
GetAttachmentRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
Attachment

The response received from the server.

GetAttachmentAsync(GetAttachmentRequest, CallOptions)

Gets the metadata of a message attachment. The attachment data is fetched using the media API. For an example, see Get metadata about a message attachment. Requires app authentication.

Declaration
public virtual AsyncUnaryCall<Attachment> GetAttachmentAsync(GetAttachmentRequest request, CallOptions options)
Parameters
Type Name Description
GetAttachmentRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<Attachment>

The call object.

GetAttachmentAsync(GetAttachmentRequest, Metadata, DateTime?, CancellationToken)

Gets the metadata of a message attachment. The attachment data is fetched using the media API. For an example, see Get metadata about a message attachment. Requires app authentication.

Declaration
public virtual AsyncUnaryCall<Attachment> GetAttachmentAsync(GetAttachmentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
GetAttachmentRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<Attachment>

The call object.

GetCustomEmoji(GetCustomEmojiRequest, CallOptions)

Returns details about a custom emoji.

Custom emojis are only available for Google Workspace accounts, and the administrator must turn custom emojis on for the organization. For more information, see Learn about custom emojis in Google Chat and Manage custom emoji permissions.

Requires user authentication.

Declaration
public virtual CustomEmoji GetCustomEmoji(GetCustomEmojiRequest request, CallOptions options)
Parameters
Type Name Description
GetCustomEmojiRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
CustomEmoji

The response received from the server.

GetCustomEmoji(GetCustomEmojiRequest, Metadata, DateTime?, CancellationToken)

Returns details about a custom emoji.

Custom emojis are only available for Google Workspace accounts, and the administrator must turn custom emojis on for the organization. For more information, see Learn about custom emojis in Google Chat and Manage custom emoji permissions.

Requires user authentication.

Declaration
public virtual CustomEmoji GetCustomEmoji(GetCustomEmojiRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
GetCustomEmojiRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
CustomEmoji

The response received from the server.

GetCustomEmojiAsync(GetCustomEmojiRequest, CallOptions)

Returns details about a custom emoji.

Custom emojis are only available for Google Workspace accounts, and the administrator must turn custom emojis on for the organization. For more information, see Learn about custom emojis in Google Chat and Manage custom emoji permissions.

Requires user authentication.

Declaration
public virtual AsyncUnaryCall<CustomEmoji> GetCustomEmojiAsync(GetCustomEmojiRequest request, CallOptions options)
Parameters
Type Name Description
GetCustomEmojiRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<CustomEmoji>

The call object.

GetCustomEmojiAsync(GetCustomEmojiRequest, Metadata, DateTime?, CancellationToken)

Returns details about a custom emoji.

Custom emojis are only available for Google Workspace accounts, and the administrator must turn custom emojis on for the organization. For more information, see Learn about custom emojis in Google Chat and Manage custom emoji permissions.

Requires user authentication.

Declaration
public virtual AsyncUnaryCall<CustomEmoji> GetCustomEmojiAsync(GetCustomEmojiRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
GetCustomEmojiRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<CustomEmoji>

The call object.

GetMembership(GetMembershipRequest, CallOptions)

Returns details about a membership. For an example, see Get details about a user's or Google Chat app's membership.

Supports the following types of authentication:

  • App authentication

  • User authentication You can authenticate and authorize this method with administrator privileges by setting the use_admin_access field in the request.

Declaration
public virtual Membership GetMembership(GetMembershipRequest request, CallOptions options)
Parameters
Type Name Description
GetMembershipRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
Membership

The response received from the server.

GetMembership(GetMembershipRequest, Metadata, DateTime?, CancellationToken)

Returns details about a membership. For an example, see Get details about a user's or Google Chat app's membership.

Supports the following types of authentication:

  • App authentication

  • User authentication You can authenticate and authorize this method with administrator privileges by setting the use_admin_access field in the request.

Declaration
public virtual Membership GetMembership(GetMembershipRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
GetMembershipRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
Membership

The response received from the server.

GetMembershipAsync(GetMembershipRequest, CallOptions)

Returns details about a membership. For an example, see Get details about a user's or Google Chat app's membership.

Supports the following types of authentication:

  • App authentication

  • User authentication You can authenticate and authorize this method with administrator privileges by setting the use_admin_access field in the request.

Declaration
public virtual AsyncUnaryCall<Membership> GetMembershipAsync(GetMembershipRequest request, CallOptions options)
Parameters
Type Name Description
GetMembershipRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<Membership>

The call object.

GetMembershipAsync(GetMembershipRequest, Metadata, DateTime?, CancellationToken)

Returns details about a membership. For an example, see Get details about a user's or Google Chat app's membership.

Supports the following types of authentication:

  • App authentication

  • User authentication You can authenticate and authorize this method with administrator privileges by setting the use_admin_access field in the request.

Declaration
public virtual AsyncUnaryCall<Membership> GetMembershipAsync(GetMembershipRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
GetMembershipRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<Membership>

The call object.

GetMessage(GetMessageRequest, CallOptions)

Returns details about a message. For an example, see Get details about a message.

Supports the following types of authentication:

  • App authentication

  • User authentication

Note: Might return a message from a blocked member or space.

Declaration
public virtual Message GetMessage(GetMessageRequest request, CallOptions options)
Parameters
Type Name Description
GetMessageRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
Message

The response received from the server.

GetMessage(GetMessageRequest, Metadata, DateTime?, CancellationToken)

Returns details about a message. For an example, see Get details about a message.

Supports the following types of authentication:

  • App authentication

  • User authentication

Note: Might return a message from a blocked member or space.

Declaration
public virtual Message GetMessage(GetMessageRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
GetMessageRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
Message

The response received from the server.

GetMessageAsync(GetMessageRequest, CallOptions)

Returns details about a message. For an example, see Get details about a message.

Supports the following types of authentication:

  • App authentication

  • User authentication

Note: Might return a message from a blocked member or space.

Declaration
public virtual AsyncUnaryCall<Message> GetMessageAsync(GetMessageRequest request, CallOptions options)
Parameters
Type Name Description
GetMessageRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<Message>

The call object.

GetMessageAsync(GetMessageRequest, Metadata, DateTime?, CancellationToken)

Returns details about a message. For an example, see Get details about a message.

Supports the following types of authentication:

  • App authentication

  • User authentication

Note: Might return a message from a blocked member or space.

Declaration
public virtual AsyncUnaryCall<Message> GetMessageAsync(GetMessageRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
GetMessageRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<Message>

The call object.

GetSpace(GetSpaceRequest, CallOptions)

Returns details about a space. For an example, see Get details about a space.

Supports the following types of authentication:

  • App authentication

  • User authentication You can authenticate and authorize this method with administrator privileges by setting the use_admin_access field in the request.

Declaration
public virtual Space GetSpace(GetSpaceRequest request, CallOptions options)
Parameters
Type Name Description
GetSpaceRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
Space

The response received from the server.

GetSpace(GetSpaceRequest, Metadata, DateTime?, CancellationToken)

Returns details about a space. For an example, see Get details about a space.

Supports the following types of authentication:

  • App authentication

  • User authentication You can authenticate and authorize this method with administrator privileges by setting the use_admin_access field in the request.

Declaration
public virtual Space GetSpace(GetSpaceRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
GetSpaceRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
Space

The response received from the server.

GetSpaceAsync(GetSpaceRequest, CallOptions)

Returns details about a space. For an example, see Get details about a space.

Supports the following types of authentication:

  • App authentication

  • User authentication You can authenticate and authorize this method with administrator privileges by setting the use_admin_access field in the request.

Declaration
public virtual AsyncUnaryCall<Space> GetSpaceAsync(GetSpaceRequest request, CallOptions options)
Parameters
Type Name Description
GetSpaceRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<Space>

The call object.

GetSpaceAsync(GetSpaceRequest, Metadata, DateTime?, CancellationToken)

Returns details about a space. For an example, see Get details about a space.

Supports the following types of authentication:

  • App authentication

  • User authentication You can authenticate and authorize this method with administrator privileges by setting the use_admin_access field in the request.

Declaration
public virtual AsyncUnaryCall<Space> GetSpaceAsync(GetSpaceRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
GetSpaceRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<Space>

The call object.

GetSpaceEvent(GetSpaceEventRequest, CallOptions)

Returns an event from a Google Chat space. The event payload contains the most recent version of the resource that changed. For example, if you request an event about a new message but the message was later updated, the server returns the updated Message resource in the event payload.

Note: The permissionSettings field is not returned in the Space object of the Space event data for this request.

Requires user authentication. To get an event, the authenticated user must be a member of the space.

For an example, see Get details about an event from a Google Chat space.

Declaration
public virtual SpaceEvent GetSpaceEvent(GetSpaceEventRequest request, CallOptions options)
Parameters
Type Name Description
GetSpaceEventRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
SpaceEvent

The response received from the server.

GetSpaceEvent(GetSpaceEventRequest, Metadata, DateTime?, CancellationToken)

Returns an event from a Google Chat space. The event payload contains the most recent version of the resource that changed. For example, if you request an event about a new message but the message was later updated, the server returns the updated Message resource in the event payload.

Note: The permissionSettings field is not returned in the Space object of the Space event data for this request.

Requires user authentication. To get an event, the authenticated user must be a member of the space.

For an example, see Get details about an event from a Google Chat space.

Declaration
public virtual SpaceEvent GetSpaceEvent(GetSpaceEventRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
GetSpaceEventRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
SpaceEvent

The response received from the server.

GetSpaceEventAsync(GetSpaceEventRequest, CallOptions)

Returns an event from a Google Chat space. The event payload contains the most recent version of the resource that changed. For example, if you request an event about a new message but the message was later updated, the server returns the updated Message resource in the event payload.

Note: The permissionSettings field is not returned in the Space object of the Space event data for this request.

Requires user authentication. To get an event, the authenticated user must be a member of the space.

For an example, see Get details about an event from a Google Chat space.

Declaration
public virtual AsyncUnaryCall<SpaceEvent> GetSpaceEventAsync(GetSpaceEventRequest request, CallOptions options)
Parameters
Type Name Description
GetSpaceEventRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<SpaceEvent>

The call object.

GetSpaceEventAsync(GetSpaceEventRequest, Metadata, DateTime?, CancellationToken)

Returns an event from a Google Chat space. The event payload contains the most recent version of the resource that changed. For example, if you request an event about a new message but the message was later updated, the server returns the updated Message resource in the event payload.

Note: The permissionSettings field is not returned in the Space object of the Space event data for this request.

Requires user authentication. To get an event, the authenticated user must be a member of the space.

For an example, see Get details about an event from a Google Chat space.

Declaration
public virtual AsyncUnaryCall<SpaceEvent> GetSpaceEventAsync(GetSpaceEventRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
GetSpaceEventRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<SpaceEvent>

The call object.

GetSpaceNotificationSetting(GetSpaceNotificationSettingRequest, CallOptions)

Gets the space notification setting. For an example, see Get the caller's space notification setting.

Requires user authentication.

Declaration
public virtual SpaceNotificationSetting GetSpaceNotificationSetting(GetSpaceNotificationSettingRequest request, CallOptions options)
Parameters
Type Name Description
GetSpaceNotificationSettingRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
SpaceNotificationSetting

The response received from the server.

GetSpaceNotificationSetting(GetSpaceNotificationSettingRequest, Metadata, DateTime?, CancellationToken)

Gets the space notification setting. For an example, see Get the caller's space notification setting.

Requires user authentication.

Declaration
public virtual SpaceNotificationSetting GetSpaceNotificationSetting(GetSpaceNotificationSettingRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
GetSpaceNotificationSettingRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
SpaceNotificationSetting

The response received from the server.

GetSpaceNotificationSettingAsync(GetSpaceNotificationSettingRequest, CallOptions)

Gets the space notification setting. For an example, see Get the caller's space notification setting.

Requires user authentication.

Declaration
public virtual AsyncUnaryCall<SpaceNotificationSetting> GetSpaceNotificationSettingAsync(GetSpaceNotificationSettingRequest request, CallOptions options)
Parameters
Type Name Description
GetSpaceNotificationSettingRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<SpaceNotificationSetting>

The call object.

GetSpaceNotificationSettingAsync(GetSpaceNotificationSettingRequest, Metadata, DateTime?, CancellationToken)

Gets the space notification setting. For an example, see Get the caller's space notification setting.

Requires user authentication.

Declaration
public virtual AsyncUnaryCall<SpaceNotificationSetting> GetSpaceNotificationSettingAsync(GetSpaceNotificationSettingRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
GetSpaceNotificationSettingRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<SpaceNotificationSetting>

The call object.

GetSpaceReadState(GetSpaceReadStateRequest, CallOptions)

Returns details about a user's read state within a space, used to identify read and unread messages. For an example, see Get details about a user's space read state.

Requires user authentication.

Declaration
public virtual SpaceReadState GetSpaceReadState(GetSpaceReadStateRequest request, CallOptions options)
Parameters
Type Name Description
GetSpaceReadStateRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
SpaceReadState

The response received from the server.

GetSpaceReadState(GetSpaceReadStateRequest, Metadata, DateTime?, CancellationToken)

Returns details about a user's read state within a space, used to identify read and unread messages. For an example, see Get details about a user's space read state.

Requires user authentication.

Declaration
public virtual SpaceReadState GetSpaceReadState(GetSpaceReadStateRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
GetSpaceReadStateRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
SpaceReadState

The response received from the server.

GetSpaceReadStateAsync(GetSpaceReadStateRequest, CallOptions)

Returns details about a user's read state within a space, used to identify read and unread messages. For an example, see Get details about a user's space read state.

Requires user authentication.

Declaration
public virtual AsyncUnaryCall<SpaceReadState> GetSpaceReadStateAsync(GetSpaceReadStateRequest request, CallOptions options)
Parameters
Type Name Description
GetSpaceReadStateRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<SpaceReadState>

The call object.

GetSpaceReadStateAsync(GetSpaceReadStateRequest, Metadata, DateTime?, CancellationToken)

Returns details about a user's read state within a space, used to identify read and unread messages. For an example, see Get details about a user's space read state.

Requires user authentication.

Declaration
public virtual AsyncUnaryCall<SpaceReadState> GetSpaceReadStateAsync(GetSpaceReadStateRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
GetSpaceReadStateRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<SpaceReadState>

The call object.

GetThreadReadState(GetThreadReadStateRequest, CallOptions)

Returns details about a user's read state within a thread, used to identify read and unread messages. For an example, see Get details about a user's thread read state.

Requires user authentication.

Declaration
public virtual ThreadReadState GetThreadReadState(GetThreadReadStateRequest request, CallOptions options)
Parameters
Type Name Description
GetThreadReadStateRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
ThreadReadState

The response received from the server.

GetThreadReadState(GetThreadReadStateRequest, Metadata, DateTime?, CancellationToken)

Returns details about a user's read state within a thread, used to identify read and unread messages. For an example, see Get details about a user's thread read state.

Requires user authentication.

Declaration
public virtual ThreadReadState GetThreadReadState(GetThreadReadStateRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
GetThreadReadStateRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
ThreadReadState

The response received from the server.

GetThreadReadStateAsync(GetThreadReadStateRequest, CallOptions)

Returns details about a user's read state within a thread, used to identify read and unread messages. For an example, see Get details about a user's thread read state.

Requires user authentication.

Declaration
public virtual AsyncUnaryCall<ThreadReadState> GetThreadReadStateAsync(GetThreadReadStateRequest request, CallOptions options)
Parameters
Type Name Description
GetThreadReadStateRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<ThreadReadState>

The call object.

GetThreadReadStateAsync(GetThreadReadStateRequest, Metadata, DateTime?, CancellationToken)

Returns details about a user's read state within a thread, used to identify read and unread messages. For an example, see Get details about a user's thread read state.

Requires user authentication.

Declaration
public virtual AsyncUnaryCall<ThreadReadState> GetThreadReadStateAsync(GetThreadReadStateRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
GetThreadReadStateRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<ThreadReadState>

The call object.

ListCustomEmojis(ListCustomEmojisRequest, CallOptions)

Lists custom emojis visible to the authenticated user.

Custom emojis are only available for Google Workspace accounts, and the administrator must turn custom emojis on for the organization. For more information, see Learn about custom emojis in Google Chat and Manage custom emoji permissions.

Requires user authentication.

Declaration
public virtual ListCustomEmojisResponse ListCustomEmojis(ListCustomEmojisRequest request, CallOptions options)
Parameters
Type Name Description
ListCustomEmojisRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
ListCustomEmojisResponse

The response received from the server.

ListCustomEmojis(ListCustomEmojisRequest, Metadata, DateTime?, CancellationToken)

Lists custom emojis visible to the authenticated user.

Custom emojis are only available for Google Workspace accounts, and the administrator must turn custom emojis on for the organization. For more information, see Learn about custom emojis in Google Chat and Manage custom emoji permissions.

Requires user authentication.

Declaration
public virtual ListCustomEmojisResponse ListCustomEmojis(ListCustomEmojisRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListCustomEmojisRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
ListCustomEmojisResponse

The response received from the server.

ListCustomEmojisAsync(ListCustomEmojisRequest, CallOptions)

Lists custom emojis visible to the authenticated user.

Custom emojis are only available for Google Workspace accounts, and the administrator must turn custom emojis on for the organization. For more information, see Learn about custom emojis in Google Chat and Manage custom emoji permissions.

Requires user authentication.

Declaration
public virtual AsyncUnaryCall<ListCustomEmojisResponse> ListCustomEmojisAsync(ListCustomEmojisRequest request, CallOptions options)
Parameters
Type Name Description
ListCustomEmojisRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<ListCustomEmojisResponse>

The call object.

ListCustomEmojisAsync(ListCustomEmojisRequest, Metadata, DateTime?, CancellationToken)

Lists custom emojis visible to the authenticated user.

Custom emojis are only available for Google Workspace accounts, and the administrator must turn custom emojis on for the organization. For more information, see Learn about custom emojis in Google Chat and Manage custom emoji permissions.

Requires user authentication.

Declaration
public virtual AsyncUnaryCall<ListCustomEmojisResponse> ListCustomEmojisAsync(ListCustomEmojisRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListCustomEmojisRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<ListCustomEmojisResponse>

The call object.

ListMemberships(ListMembershipsRequest, CallOptions)

Lists memberships in a space. For an example, see List users and Google Chat apps in a space. Listing memberships with app authentication lists memberships in spaces that the Chat app has access to, but excludes Chat app memberships, including its own. Listing memberships with User authentication lists memberships in spaces that the authenticated user has access to.

Supports the following types of authentication:

  • App authentication

  • User authentication You can authenticate and authorize this method with administrator privileges by setting the use_admin_access field in the request.

Declaration
public virtual ListMembershipsResponse ListMemberships(ListMembershipsRequest request, CallOptions options)
Parameters
Type Name Description
ListMembershipsRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
ListMembershipsResponse

The response received from the server.

ListMemberships(ListMembershipsRequest, Metadata, DateTime?, CancellationToken)

Lists memberships in a space. For an example, see List users and Google Chat apps in a space. Listing memberships with app authentication lists memberships in spaces that the Chat app has access to, but excludes Chat app memberships, including its own. Listing memberships with User authentication lists memberships in spaces that the authenticated user has access to.

Supports the following types of authentication:

  • App authentication

  • User authentication You can authenticate and authorize this method with administrator privileges by setting the use_admin_access field in the request.

Declaration
public virtual ListMembershipsResponse ListMemberships(ListMembershipsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListMembershipsRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
ListMembershipsResponse

The response received from the server.

ListMembershipsAsync(ListMembershipsRequest, CallOptions)

Lists memberships in a space. For an example, see List users and Google Chat apps in a space. Listing memberships with app authentication lists memberships in spaces that the Chat app has access to, but excludes Chat app memberships, including its own. Listing memberships with User authentication lists memberships in spaces that the authenticated user has access to.

Supports the following types of authentication:

  • App authentication

  • User authentication You can authenticate and authorize this method with administrator privileges by setting the use_admin_access field in the request.

Declaration
public virtual AsyncUnaryCall<ListMembershipsResponse> ListMembershipsAsync(ListMembershipsRequest request, CallOptions options)
Parameters
Type Name Description
ListMembershipsRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<ListMembershipsResponse>

The call object.

ListMembershipsAsync(ListMembershipsRequest, Metadata, DateTime?, CancellationToken)

Lists memberships in a space. For an example, see List users and Google Chat apps in a space. Listing memberships with app authentication lists memberships in spaces that the Chat app has access to, but excludes Chat app memberships, including its own. Listing memberships with User authentication lists memberships in spaces that the authenticated user has access to.

Supports the following types of authentication:

  • App authentication

  • User authentication You can authenticate and authorize this method with administrator privileges by setting the use_admin_access field in the request.

Declaration
public virtual AsyncUnaryCall<ListMembershipsResponse> ListMembershipsAsync(ListMembershipsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListMembershipsRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<ListMembershipsResponse>

The call object.

ListMessages(ListMessagesRequest, CallOptions)

Lists messages in a space that the caller is a member of, including messages from blocked members and spaces. If you list messages from a space with no messages, the response is an empty object. When using a REST/HTTP interface, the response contains an empty JSON object, {}. For an example, see List messages.

Requires user authentication.

Declaration
public virtual ListMessagesResponse ListMessages(ListMessagesRequest request, CallOptions options)
Parameters
Type Name Description
ListMessagesRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
ListMessagesResponse

The response received from the server.

ListMessages(ListMessagesRequest, Metadata, DateTime?, CancellationToken)

Lists messages in a space that the caller is a member of, including messages from blocked members and spaces. If you list messages from a space with no messages, the response is an empty object. When using a REST/HTTP interface, the response contains an empty JSON object, {}. For an example, see List messages.

Requires user authentication.

Declaration
public virtual ListMessagesResponse ListMessages(ListMessagesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListMessagesRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
ListMessagesResponse

The response received from the server.

ListMessagesAsync(ListMessagesRequest, CallOptions)

Lists messages in a space that the caller is a member of, including messages from blocked members and spaces. If you list messages from a space with no messages, the response is an empty object. When using a REST/HTTP interface, the response contains an empty JSON object, {}. For an example, see List messages.

Requires user authentication.

Declaration
public virtual AsyncUnaryCall<ListMessagesResponse> ListMessagesAsync(ListMessagesRequest request, CallOptions options)
Parameters
Type Name Description
ListMessagesRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<ListMessagesResponse>

The call object.

ListMessagesAsync(ListMessagesRequest, Metadata, DateTime?, CancellationToken)

Lists messages in a space that the caller is a member of, including messages from blocked members and spaces. If you list messages from a space with no messages, the response is an empty object. When using a REST/HTTP interface, the response contains an empty JSON object, {}. For an example, see List messages.

Requires user authentication.

Declaration
public virtual AsyncUnaryCall<ListMessagesResponse> ListMessagesAsync(ListMessagesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListMessagesRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<ListMessagesResponse>

The call object.

ListReactions(ListReactionsRequest, CallOptions)

Lists reactions to a message. For an example, see List reactions for a message.

Requires user authentication.

Declaration
public virtual ListReactionsResponse ListReactions(ListReactionsRequest request, CallOptions options)
Parameters
Type Name Description
ListReactionsRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
ListReactionsResponse

The response received from the server.

ListReactions(ListReactionsRequest, Metadata, DateTime?, CancellationToken)

Lists reactions to a message. For an example, see List reactions for a message.

Requires user authentication.

Declaration
public virtual ListReactionsResponse ListReactions(ListReactionsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListReactionsRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
ListReactionsResponse

The response received from the server.

ListReactionsAsync(ListReactionsRequest, CallOptions)

Lists reactions to a message. For an example, see List reactions for a message.

Requires user authentication.

Declaration
public virtual AsyncUnaryCall<ListReactionsResponse> ListReactionsAsync(ListReactionsRequest request, CallOptions options)
Parameters
Type Name Description
ListReactionsRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<ListReactionsResponse>

The call object.

ListReactionsAsync(ListReactionsRequest, Metadata, DateTime?, CancellationToken)

Lists reactions to a message. For an example, see List reactions for a message.

Requires user authentication.

Declaration
public virtual AsyncUnaryCall<ListReactionsResponse> ListReactionsAsync(ListReactionsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListReactionsRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<ListReactionsResponse>

The call object.

ListSpaceEvents(ListSpaceEventsRequest, CallOptions)

Lists events from a Google Chat space. For each event, the payload contains the most recent version of the Chat resource. For example, if you list events about new space members, the server returns Membership resources that contain the latest membership details. If new members were removed during the requested period, the event payload contains an empty Membership resource.

Requires user authentication. To list events, the authenticated user must be a member of the space.

For an example, see List events from a Google Chat space.

Declaration
public virtual ListSpaceEventsResponse ListSpaceEvents(ListSpaceEventsRequest request, CallOptions options)
Parameters
Type Name Description
ListSpaceEventsRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
ListSpaceEventsResponse

The response received from the server.

ListSpaceEvents(ListSpaceEventsRequest, Metadata, DateTime?, CancellationToken)

Lists events from a Google Chat space. For each event, the payload contains the most recent version of the Chat resource. For example, if you list events about new space members, the server returns Membership resources that contain the latest membership details. If new members were removed during the requested period, the event payload contains an empty Membership resource.

Requires user authentication. To list events, the authenticated user must be a member of the space.

For an example, see List events from a Google Chat space.

Declaration
public virtual ListSpaceEventsResponse ListSpaceEvents(ListSpaceEventsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListSpaceEventsRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
ListSpaceEventsResponse

The response received from the server.

ListSpaceEventsAsync(ListSpaceEventsRequest, CallOptions)

Lists events from a Google Chat space. For each event, the payload contains the most recent version of the Chat resource. For example, if you list events about new space members, the server returns Membership resources that contain the latest membership details. If new members were removed during the requested period, the event payload contains an empty Membership resource.

Requires user authentication. To list events, the authenticated user must be a member of the space.

For an example, see List events from a Google Chat space.

Declaration
public virtual AsyncUnaryCall<ListSpaceEventsResponse> ListSpaceEventsAsync(ListSpaceEventsRequest request, CallOptions options)
Parameters
Type Name Description
ListSpaceEventsRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<ListSpaceEventsResponse>

The call object.

ListSpaceEventsAsync(ListSpaceEventsRequest, Metadata, DateTime?, CancellationToken)

Lists events from a Google Chat space. For each event, the payload contains the most recent version of the Chat resource. For example, if you list events about new space members, the server returns Membership resources that contain the latest membership details. If new members were removed during the requested period, the event payload contains an empty Membership resource.

Requires user authentication. To list events, the authenticated user must be a member of the space.

For an example, see List events from a Google Chat space.

Declaration
public virtual AsyncUnaryCall<ListSpaceEventsResponse> ListSpaceEventsAsync(ListSpaceEventsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListSpaceEventsRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<ListSpaceEventsResponse>

The call object.

ListSpaces(ListSpacesRequest, CallOptions)

Lists spaces the caller is a member of. Group chats and DMs aren't listed until the first message is sent. For an example, see List spaces.

Supports the following types of authentication:

  • App authentication

  • User authentication

To list all named spaces by Google Workspace organization, use the spaces.search() method using Workspace administrator privileges instead.

Declaration
public virtual ListSpacesResponse ListSpaces(ListSpacesRequest request, CallOptions options)
Parameters
Type Name Description
ListSpacesRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
ListSpacesResponse

The response received from the server.

ListSpaces(ListSpacesRequest, Metadata, DateTime?, CancellationToken)

Lists spaces the caller is a member of. Group chats and DMs aren't listed until the first message is sent. For an example, see List spaces.

Supports the following types of authentication:

  • App authentication

  • User authentication

To list all named spaces by Google Workspace organization, use the spaces.search() method using Workspace administrator privileges instead.

Declaration
public virtual ListSpacesResponse ListSpaces(ListSpacesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListSpacesRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
ListSpacesResponse

The response received from the server.

ListSpacesAsync(ListSpacesRequest, CallOptions)

Lists spaces the caller is a member of. Group chats and DMs aren't listed until the first message is sent. For an example, see List spaces.

Supports the following types of authentication:

  • App authentication

  • User authentication

To list all named spaces by Google Workspace organization, use the spaces.search() method using Workspace administrator privileges instead.

Declaration
public virtual AsyncUnaryCall<ListSpacesResponse> ListSpacesAsync(ListSpacesRequest request, CallOptions options)
Parameters
Type Name Description
ListSpacesRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<ListSpacesResponse>

The call object.

ListSpacesAsync(ListSpacesRequest, Metadata, DateTime?, CancellationToken)

Lists spaces the caller is a member of. Group chats and DMs aren't listed until the first message is sent. For an example, see List spaces.

Supports the following types of authentication:

  • App authentication

  • User authentication

To list all named spaces by Google Workspace organization, use the spaces.search() method using Workspace administrator privileges instead.

Declaration
public virtual AsyncUnaryCall<ListSpacesResponse> ListSpacesAsync(ListSpacesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ListSpacesRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<ListSpacesResponse>

The call object.

NewInstance(ClientBaseConfiguration)

Creates a new instance of client from given ClientBaseConfiguration.

Declaration
protected override ChatService.ChatServiceClient NewInstance(ClientBase.ClientBaseConfiguration configuration)
Parameters
Type Name Description
ClientBase.ClientBaseConfiguration configuration
Returns
Type Description
ChatService.ChatServiceClient
Overrides
Grpc.Core.ClientBase<Google.Apps.Chat.V1.ChatService.ChatServiceClient>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)

SearchSpaces(SearchSpacesRequest, CallOptions)

Returns a list of spaces in a Google Workspace organization based on an administrator's search.

Requires user authentication with administrator privileges. In the request, set use_admin_access to true.

Declaration
public virtual SearchSpacesResponse SearchSpaces(SearchSpacesRequest request, CallOptions options)
Parameters
Type Name Description
SearchSpacesRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
SearchSpacesResponse

The response received from the server.

SearchSpaces(SearchSpacesRequest, Metadata, DateTime?, CancellationToken)

Returns a list of spaces in a Google Workspace organization based on an administrator's search.

Requires user authentication with administrator privileges. In the request, set use_admin_access to true.

Declaration
public virtual SearchSpacesResponse SearchSpaces(SearchSpacesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
SearchSpacesRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
SearchSpacesResponse

The response received from the server.

SearchSpacesAsync(SearchSpacesRequest, CallOptions)

Returns a list of spaces in a Google Workspace organization based on an administrator's search.

Requires user authentication with administrator privileges. In the request, set use_admin_access to true.

Declaration
public virtual AsyncUnaryCall<SearchSpacesResponse> SearchSpacesAsync(SearchSpacesRequest request, CallOptions options)
Parameters
Type Name Description
SearchSpacesRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<SearchSpacesResponse>

The call object.

SearchSpacesAsync(SearchSpacesRequest, Metadata, DateTime?, CancellationToken)

Returns a list of spaces in a Google Workspace organization based on an administrator's search.

Requires user authentication with administrator privileges. In the request, set use_admin_access to true.

Declaration
public virtual AsyncUnaryCall<SearchSpacesResponse> SearchSpacesAsync(SearchSpacesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
SearchSpacesRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<SearchSpacesResponse>

The call object.

SetUpSpace(SetUpSpaceRequest, CallOptions)

Creates a space and adds specified users to it. The calling user is automatically added to the space, and shouldn't be specified as a membership in the request. For an example, see Set up a space with initial members.

To specify the human members to add, add memberships with the appropriate membership.member.name. To add a human user, use users/{user}, where {user} can be the email address for the user. For users in the same Workspace organization {user} can also be the id for the person from the People API, or the id for the user in the Directory API. For example, if the People API Person profile ID for user@example.com is 123456789, you can add the user to the space by setting the membership.member.name to users/user@example.com or users/123456789.

To specify the Google groups to add, add memberships with the appropriate membership.group_member.name. To add or invite a Google group, use groups/{group}, where {group} is the id for the group from the Cloud Identity Groups API. For example, you can use Cloud Identity Groups lookup API to retrieve the ID 123456789 for group email group@example.com, then you can add the group to the space by setting the membership.group_member.name to groups/123456789. Group email is not supported, and Google groups can only be added as members in named spaces.

For a named space or group chat, if the caller blocks, or is blocked by some members, or doesn't have permission to add some members, then those members aren't added to the created space.

To create a direct message (DM) between the calling user and another human user, specify exactly one membership to represent the human user. If one user blocks the other, the request fails and the DM isn't created.

To create a DM between the calling user and the calling app, set Space.singleUserBotDm to true and don't specify any memberships. You can only use this method to set up a DM with the calling app. To add the calling app as a member of a space or an existing DM between two human users, see Invite or add a user or app to a space.

If a DM already exists between two users, even when one user blocks the other at the time a request is made, then the existing DM is returned.

Spaces with threaded replies aren't supported. If you receive the error message ALREADY_EXISTS when setting up a space, try a different displayName. An existing space within the Google Workspace organization might already use this display name.

Requires user authentication.

Declaration
public virtual Space SetUpSpace(SetUpSpaceRequest request, CallOptions options)
Parameters
Type Name Description
SetUpSpaceRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
Space

The response received from the server.

SetUpSpace(SetUpSpaceRequest, Metadata, DateTime?, CancellationToken)

Creates a space and adds specified users to it. The calling user is automatically added to the space, and shouldn't be specified as a membership in the request. For an example, see Set up a space with initial members.

To specify the human members to add, add memberships with the appropriate membership.member.name. To add a human user, use users/{user}, where {user} can be the email address for the user. For users in the same Workspace organization {user} can also be the id for the person from the People API, or the id for the user in the Directory API. For example, if the People API Person profile ID for user@example.com is 123456789, you can add the user to the space by setting the membership.member.name to users/user@example.com or users/123456789.

To specify the Google groups to add, add memberships with the appropriate membership.group_member.name. To add or invite a Google group, use groups/{group}, where {group} is the id for the group from the Cloud Identity Groups API. For example, you can use Cloud Identity Groups lookup API to retrieve the ID 123456789 for group email group@example.com, then you can add the group to the space by setting the membership.group_member.name to groups/123456789. Group email is not supported, and Google groups can only be added as members in named spaces.

For a named space or group chat, if the caller blocks, or is blocked by some members, or doesn't have permission to add some members, then those members aren't added to the created space.

To create a direct message (DM) between the calling user and another human user, specify exactly one membership to represent the human user. If one user blocks the other, the request fails and the DM isn't created.

To create a DM between the calling user and the calling app, set Space.singleUserBotDm to true and don't specify any memberships. You can only use this method to set up a DM with the calling app. To add the calling app as a member of a space or an existing DM between two human users, see Invite or add a user or app to a space.

If a DM already exists between two users, even when one user blocks the other at the time a request is made, then the existing DM is returned.

Spaces with threaded replies aren't supported. If you receive the error message ALREADY_EXISTS when setting up a space, try a different displayName. An existing space within the Google Workspace organization might already use this display name.

Requires user authentication.

Declaration
public virtual Space SetUpSpace(SetUpSpaceRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
SetUpSpaceRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
Space

The response received from the server.

SetUpSpaceAsync(SetUpSpaceRequest, CallOptions)

Creates a space and adds specified users to it. The calling user is automatically added to the space, and shouldn't be specified as a membership in the request. For an example, see Set up a space with initial members.

To specify the human members to add, add memberships with the appropriate membership.member.name. To add a human user, use users/{user}, where {user} can be the email address for the user. For users in the same Workspace organization {user} can also be the id for the person from the People API, or the id for the user in the Directory API. For example, if the People API Person profile ID for user@example.com is 123456789, you can add the user to the space by setting the membership.member.name to users/user@example.com or users/123456789.

To specify the Google groups to add, add memberships with the appropriate membership.group_member.name. To add or invite a Google group, use groups/{group}, where {group} is the id for the group from the Cloud Identity Groups API. For example, you can use Cloud Identity Groups lookup API to retrieve the ID 123456789 for group email group@example.com, then you can add the group to the space by setting the membership.group_member.name to groups/123456789. Group email is not supported, and Google groups can only be added as members in named spaces.

For a named space or group chat, if the caller blocks, or is blocked by some members, or doesn't have permission to add some members, then those members aren't added to the created space.

To create a direct message (DM) between the calling user and another human user, specify exactly one membership to represent the human user. If one user blocks the other, the request fails and the DM isn't created.

To create a DM between the calling user and the calling app, set Space.singleUserBotDm to true and don't specify any memberships. You can only use this method to set up a DM with the calling app. To add the calling app as a member of a space or an existing DM between two human users, see Invite or add a user or app to a space.

If a DM already exists between two users, even when one user blocks the other at the time a request is made, then the existing DM is returned.

Spaces with threaded replies aren't supported. If you receive the error message ALREADY_EXISTS when setting up a space, try a different displayName. An existing space within the Google Workspace organization might already use this display name.

Requires user authentication.

Declaration
public virtual AsyncUnaryCall<Space> SetUpSpaceAsync(SetUpSpaceRequest request, CallOptions options)
Parameters
Type Name Description
SetUpSpaceRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<Space>

The call object.

SetUpSpaceAsync(SetUpSpaceRequest, Metadata, DateTime?, CancellationToken)

Creates a space and adds specified users to it. The calling user is automatically added to the space, and shouldn't be specified as a membership in the request. For an example, see Set up a space with initial members.

To specify the human members to add, add memberships with the appropriate membership.member.name. To add a human user, use users/{user}, where {user} can be the email address for the user. For users in the same Workspace organization {user} can also be the id for the person from the People API, or the id for the user in the Directory API. For example, if the People API Person profile ID for user@example.com is 123456789, you can add the user to the space by setting the membership.member.name to users/user@example.com or users/123456789.

To specify the Google groups to add, add memberships with the appropriate membership.group_member.name. To add or invite a Google group, use groups/{group}, where {group} is the id for the group from the Cloud Identity Groups API. For example, you can use Cloud Identity Groups lookup API to retrieve the ID 123456789 for group email group@example.com, then you can add the group to the space by setting the membership.group_member.name to groups/123456789. Group email is not supported, and Google groups can only be added as members in named spaces.

For a named space or group chat, if the caller blocks, or is blocked by some members, or doesn't have permission to add some members, then those members aren't added to the created space.

To create a direct message (DM) between the calling user and another human user, specify exactly one membership to represent the human user. If one user blocks the other, the request fails and the DM isn't created.

To create a DM between the calling user and the calling app, set Space.singleUserBotDm to true and don't specify any memberships. You can only use this method to set up a DM with the calling app. To add the calling app as a member of a space or an existing DM between two human users, see Invite or add a user or app to a space.

If a DM already exists between two users, even when one user blocks the other at the time a request is made, then the existing DM is returned.

Spaces with threaded replies aren't supported. If you receive the error message ALREADY_EXISTS when setting up a space, try a different displayName. An existing space within the Google Workspace organization might already use this display name.

Requires user authentication.

Declaration
public virtual AsyncUnaryCall<Space> SetUpSpaceAsync(SetUpSpaceRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
SetUpSpaceRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<Space>

The call object.

UpdateMembership(UpdateMembershipRequest, CallOptions)

Updates a membership. For an example, see Update a user's membership in a space.

Supports the following types of authentication:

  • App authentication with administrator approval in Developer Preview

  • User authentication You can authenticate and authorize this method with administrator privileges by setting the use_admin_access field in the request.

Declaration
public virtual Membership UpdateMembership(UpdateMembershipRequest request, CallOptions options)
Parameters
Type Name Description
UpdateMembershipRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
Membership

The response received from the server.

UpdateMembership(UpdateMembershipRequest, Metadata, DateTime?, CancellationToken)

Updates a membership. For an example, see Update a user's membership in a space.

Supports the following types of authentication:

  • App authentication with administrator approval in Developer Preview

  • User authentication You can authenticate and authorize this method with administrator privileges by setting the use_admin_access field in the request.

Declaration
public virtual Membership UpdateMembership(UpdateMembershipRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
UpdateMembershipRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
Membership

The response received from the server.

UpdateMembershipAsync(UpdateMembershipRequest, CallOptions)

Updates a membership. For an example, see Update a user's membership in a space.

Supports the following types of authentication:

  • App authentication with administrator approval in Developer Preview

  • User authentication You can authenticate and authorize this method with administrator privileges by setting the use_admin_access field in the request.

Declaration
public virtual AsyncUnaryCall<Membership> UpdateMembershipAsync(UpdateMembershipRequest request, CallOptions options)
Parameters
Type Name Description
UpdateMembershipRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<Membership>

The call object.

UpdateMembershipAsync(UpdateMembershipRequest, Metadata, DateTime?, CancellationToken)

Updates a membership. For an example, see Update a user's membership in a space.

Supports the following types of authentication:

  • App authentication with administrator approval in Developer Preview

  • User authentication You can authenticate and authorize this method with administrator privileges by setting the use_admin_access field in the request.

Declaration
public virtual AsyncUnaryCall<Membership> UpdateMembershipAsync(UpdateMembershipRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
UpdateMembershipRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<Membership>

The call object.

UpdateMessage(UpdateMessageRequest, CallOptions)

Updates a message. There's a difference between the patch and update methods. The patch method uses a patch request while the update method uses a put request. We recommend using the patch method. For an example, see Update a message.

Supports the following types of authentication:

  • App authentication

  • User authentication

When using app authentication, requests can only update messages created by the calling Chat app.

Declaration
public virtual Message UpdateMessage(UpdateMessageRequest request, CallOptions options)
Parameters
Type Name Description
UpdateMessageRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
Message

The response received from the server.

UpdateMessage(UpdateMessageRequest, Metadata, DateTime?, CancellationToken)

Updates a message. There's a difference between the patch and update methods. The patch method uses a patch request while the update method uses a put request. We recommend using the patch method. For an example, see Update a message.

Supports the following types of authentication:

  • App authentication

  • User authentication

When using app authentication, requests can only update messages created by the calling Chat app.

Declaration
public virtual Message UpdateMessage(UpdateMessageRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
UpdateMessageRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
Message

The response received from the server.

UpdateMessageAsync(UpdateMessageRequest, CallOptions)

Updates a message. There's a difference between the patch and update methods. The patch method uses a patch request while the update method uses a put request. We recommend using the patch method. For an example, see Update a message.

Supports the following types of authentication:

  • App authentication

  • User authentication

When using app authentication, requests can only update messages created by the calling Chat app.

Declaration
public virtual AsyncUnaryCall<Message> UpdateMessageAsync(UpdateMessageRequest request, CallOptions options)
Parameters
Type Name Description
UpdateMessageRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<Message>

The call object.

UpdateMessageAsync(UpdateMessageRequest, Metadata, DateTime?, CancellationToken)

Updates a message. There's a difference between the patch and update methods. The patch method uses a patch request while the update method uses a put request. We recommend using the patch method. For an example, see Update a message.

Supports the following types of authentication:

  • App authentication

  • User authentication

When using app authentication, requests can only update messages created by the calling Chat app.

Declaration
public virtual AsyncUnaryCall<Message> UpdateMessageAsync(UpdateMessageRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
UpdateMessageRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<Message>

The call object.

UpdateSpace(UpdateSpaceRequest, CallOptions)

Updates a space. For an example, see Update a space.

If you're updating the displayName field and receive the error message ALREADY_EXISTS, try a different display name.. An existing space within the Google Workspace organization might already use this display name.

Supports the following types of authentication:

  • App authentication with administrator approval in Developer Preview

  • User authentication You can authenticate and authorize this method with administrator privileges by setting the use_admin_access field in the request.

Declaration
public virtual Space UpdateSpace(UpdateSpaceRequest request, CallOptions options)
Parameters
Type Name Description
UpdateSpaceRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
Space

The response received from the server.

UpdateSpace(UpdateSpaceRequest, Metadata, DateTime?, CancellationToken)

Updates a space. For an example, see Update a space.

If you're updating the displayName field and receive the error message ALREADY_EXISTS, try a different display name.. An existing space within the Google Workspace organization might already use this display name.

Supports the following types of authentication:

  • App authentication with administrator approval in Developer Preview

  • User authentication You can authenticate and authorize this method with administrator privileges by setting the use_admin_access field in the request.

Declaration
public virtual Space UpdateSpace(UpdateSpaceRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
UpdateSpaceRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
Space

The response received from the server.

UpdateSpaceAsync(UpdateSpaceRequest, CallOptions)

Updates a space. For an example, see Update a space.

If you're updating the displayName field and receive the error message ALREADY_EXISTS, try a different display name.. An existing space within the Google Workspace organization might already use this display name.

Supports the following types of authentication:

  • App authentication with administrator approval in Developer Preview

  • User authentication You can authenticate and authorize this method with administrator privileges by setting the use_admin_access field in the request.

Declaration
public virtual AsyncUnaryCall<Space> UpdateSpaceAsync(UpdateSpaceRequest request, CallOptions options)
Parameters
Type Name Description
UpdateSpaceRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<Space>

The call object.

UpdateSpaceAsync(UpdateSpaceRequest, Metadata, DateTime?, CancellationToken)

Updates a space. For an example, see Update a space.

If you're updating the displayName field and receive the error message ALREADY_EXISTS, try a different display name.. An existing space within the Google Workspace organization might already use this display name.

Supports the following types of authentication:

  • App authentication with administrator approval in Developer Preview

  • User authentication You can authenticate and authorize this method with administrator privileges by setting the use_admin_access field in the request.

Declaration
public virtual AsyncUnaryCall<Space> UpdateSpaceAsync(UpdateSpaceRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
UpdateSpaceRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<Space>

The call object.

UpdateSpaceNotificationSetting(UpdateSpaceNotificationSettingRequest, CallOptions)

Updates the space notification setting. For an example, see Update the caller's space notification setting.

Requires user authentication.

Declaration
public virtual SpaceNotificationSetting UpdateSpaceNotificationSetting(UpdateSpaceNotificationSettingRequest request, CallOptions options)
Parameters
Type Name Description
UpdateSpaceNotificationSettingRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
SpaceNotificationSetting

The response received from the server.

UpdateSpaceNotificationSetting(UpdateSpaceNotificationSettingRequest, Metadata, DateTime?, CancellationToken)

Updates the space notification setting. For an example, see Update the caller's space notification setting.

Requires user authentication.

Declaration
public virtual SpaceNotificationSetting UpdateSpaceNotificationSetting(UpdateSpaceNotificationSettingRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
UpdateSpaceNotificationSettingRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
SpaceNotificationSetting

The response received from the server.

UpdateSpaceNotificationSettingAsync(UpdateSpaceNotificationSettingRequest, CallOptions)

Updates the space notification setting. For an example, see Update the caller's space notification setting.

Requires user authentication.

Declaration
public virtual AsyncUnaryCall<SpaceNotificationSetting> UpdateSpaceNotificationSettingAsync(UpdateSpaceNotificationSettingRequest request, CallOptions options)
Parameters
Type Name Description
UpdateSpaceNotificationSettingRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<SpaceNotificationSetting>

The call object.

UpdateSpaceNotificationSettingAsync(UpdateSpaceNotificationSettingRequest, Metadata, DateTime?, CancellationToken)

Updates the space notification setting. For an example, see Update the caller's space notification setting.

Requires user authentication.

Declaration
public virtual AsyncUnaryCall<SpaceNotificationSetting> UpdateSpaceNotificationSettingAsync(UpdateSpaceNotificationSettingRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
UpdateSpaceNotificationSettingRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<SpaceNotificationSetting>

The call object.

UpdateSpaceReadState(UpdateSpaceReadStateRequest, CallOptions)

Updates a user's read state within a space, used to identify read and unread messages. For an example, see Update a user's space read state.

Requires user authentication.

Declaration
public virtual SpaceReadState UpdateSpaceReadState(UpdateSpaceReadStateRequest request, CallOptions options)
Parameters
Type Name Description
UpdateSpaceReadStateRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
SpaceReadState

The response received from the server.

UpdateSpaceReadState(UpdateSpaceReadStateRequest, Metadata, DateTime?, CancellationToken)

Updates a user's read state within a space, used to identify read and unread messages. For an example, see Update a user's space read state.

Requires user authentication.

Declaration
public virtual SpaceReadState UpdateSpaceReadState(UpdateSpaceReadStateRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
UpdateSpaceReadStateRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
SpaceReadState

The response received from the server.

UpdateSpaceReadStateAsync(UpdateSpaceReadStateRequest, CallOptions)

Updates a user's read state within a space, used to identify read and unread messages. For an example, see Update a user's space read state.

Requires user authentication.

Declaration
public virtual AsyncUnaryCall<SpaceReadState> UpdateSpaceReadStateAsync(UpdateSpaceReadStateRequest request, CallOptions options)
Parameters
Type Name Description
UpdateSpaceReadStateRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<SpaceReadState>

The call object.

UpdateSpaceReadStateAsync(UpdateSpaceReadStateRequest, Metadata, DateTime?, CancellationToken)

Updates a user's read state within a space, used to identify read and unread messages. For an example, see Update a user's space read state.

Requires user authentication.

Declaration
public virtual AsyncUnaryCall<SpaceReadState> UpdateSpaceReadStateAsync(UpdateSpaceReadStateRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
UpdateSpaceReadStateRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<SpaceReadState>

The call object.

UploadAttachment(UploadAttachmentRequest, CallOptions)

Uploads an attachment. For an example, see Upload media as a file attachment.

Requires user authentication.

You can upload attachments up to 200 MB. Certain file types aren't supported. For details, see File types blocked by Google Chat.

Declaration
public virtual UploadAttachmentResponse UploadAttachment(UploadAttachmentRequest request, CallOptions options)
Parameters
Type Name Description
UploadAttachmentRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
UploadAttachmentResponse

The response received from the server.

UploadAttachment(UploadAttachmentRequest, Metadata, DateTime?, CancellationToken)

Uploads an attachment. For an example, see Upload media as a file attachment.

Requires user authentication.

You can upload attachments up to 200 MB. Certain file types aren't supported. For details, see File types blocked by Google Chat.

Declaration
public virtual UploadAttachmentResponse UploadAttachment(UploadAttachmentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
UploadAttachmentRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
UploadAttachmentResponse

The response received from the server.

UploadAttachmentAsync(UploadAttachmentRequest, CallOptions)

Uploads an attachment. For an example, see Upload media as a file attachment.

Requires user authentication.

You can upload attachments up to 200 MB. Certain file types aren't supported. For details, see File types blocked by Google Chat.

Declaration
public virtual AsyncUnaryCall<UploadAttachmentResponse> UploadAttachmentAsync(UploadAttachmentRequest request, CallOptions options)
Parameters
Type Name Description
UploadAttachmentRequest request

The request to send to the server.

CallOptions options

The options for the call.

Returns
Type Description
AsyncUnaryCall<UploadAttachmentResponse>

The call object.

UploadAttachmentAsync(UploadAttachmentRequest, Metadata, DateTime?, CancellationToken)

Uploads an attachment. For an example, see Upload media as a file attachment.

Requires user authentication.

You can upload attachments up to 200 MB. Certain file types aren't supported. For details, see File types blocked by Google Chat.

Declaration
public virtual AsyncUnaryCall<UploadAttachmentResponse> UploadAttachmentAsync(UploadAttachmentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
UploadAttachmentRequest request

The request to send to the server.

Metadata headers

The initial metadata to send with the call. This parameter is optional.

DateTime? deadline

An optional deadline for the call. The call will be cancelled if deadline is hit.

CancellationToken cancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCall<UploadAttachmentResponse>

The call object.

In this article
Back to top Generated by DocFX