Namespace Google.Apis.HangoutsChat.v1
Classes
HangoutsChatBaseServiceRequest<TResponse>
A base abstract class for HangoutsChat requests.
HangoutsChatService
The HangoutsChat Service.
HangoutsChatService.Scope
Available OAuth 2.0 scopes for use with the Google Chat API.
HangoutsChatService.ScopeConstants
Available OAuth 2.0 scope constants for use with the Google Chat API.
MediaResource
The "media" collection of methods.
MediaResource.DownloadRequest
Downloads media. Download is supported on the URI /v1/media/{+name}?alt=media
.
MediaResource.UploadMediaUpload
Upload media upload which supports resumable upload.
MediaResource.UploadRequest
Uploads an attachment. For an example, see Upload media as a file
attachment. Requires user
authentication and the chat.messages
or
chat.messages.create
authorization scope. You can upload attachments up to 200 MB. Certain file types
aren't supported. For details, see File types blocked by Google
Chat.
SpacesResource
The "spaces" collection of methods.
SpacesResource.CreateRequest
Creates a named space. Spaces grouped by topics or that have guest access aren't supported. For an example,
see Create a space. Requires user
authentication and the chat.spaces.create
or
chat.spaces
scope.
SpacesResource.DeleteRequest
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. Requires user
authentication from a user who has permission to
delete the space, and the chat.delete
scope.
SpacesResource.FindDirectMessageRequest
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 user
authentication, returns the direct message space
between the specified user and the authenticated user. With service account
authentication, returns the direct
message space between the specified user and the calling Chat app. Requires user
authentication or service account
authentication.
SpacesResource.GetRequest
Returns details about a space. For an example, see Get a
space. Requires
authentication. Fully supports service account
authentication and user
authentication. User
authentication requires the chat.spaces
or
chat.spaces.readonly
authorization scope.
SpacesResource.ListRequest
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. Requires
authentication. Fully supports service account
authentication and user
authentication requires the chat.spaces
or
chat.spaces.readonly
authorization scope. Lists spaces visible to the caller or authenticated user. Group
chats and DMs aren't listed until the first message is sent.
SpacesResource.MembersResource
The "members" collection of methods.
SpacesResource.MembersResource.CreateRequest
Creates a human membership or app membership for the calling app. Creating memberships for other apps
isn't supported. For an example, see Create a
membership. 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. Requires user
authentication and the chat.memberships
(for human membership) or chat.memberships.app
(for app membership) scope. To specify the member to
add, set the membership.member.name
in the CreateMembershipRequest
: - To add the calling app to a
space or a direct message between two human users, use users/app
. Unable to add other apps to the
space. - To add a human user, use users/{user}
, where {user}
is either the {person_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
resourceName
is people/123456789
, you can add the user
to the space by setting the membership.member.name
to users/123456789
.
SpacesResource.MembersResource.DeleteRequest
Deletes a membership. For an example, see Delete a
membership. Requires user
authentication and the chat.memberships
or
chat.memberships.app
authorization scope.
SpacesResource.MembersResource.GetRequest
Returns details about a membership. For an example, see Get a
membership. Requires
authentication. Fully supports service account
authentication and user
authentication. User
authentication requires the
chat.memberships
or chat.memberships.readonly
authorization scope.
SpacesResource.MembersResource.ListRequest
Lists memberships in a space. For an example, see List
memberships. 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. Requires
authentication. Fully supports service account
authentication and user
authentication. User
authentication requires the
chat.memberships
or chat.memberships.readonly
authorization scope.
SpacesResource.MessagesResource
The "messages" collection of methods.
SpacesResource.MessagesResource.AttachmentsResource
The "attachments" collection of methods.
SpacesResource.MessagesResource.AttachmentsResource.GetRequest
Gets the metadata of a message attachment. The attachment data is fetched using the media API. For an example, see Get a message attachment. Requires service account authentication.
SpacesResource.MessagesResource.CreateRequest
Creates a message. For an example, see Create a
message. Requires
authentication. Creating a text message supports
both user authentication and [app
authentication] (https://developers.google.com/chat/api/guides/auth/service-accounts). User
authentication requires the chat.messages
or chat.messages.create
authorization scope. Creating a card message requires [app authentication]
(https://developers.google.com/chat/api/guides/auth/service-accounts) Because Chat provides
authentication for webhooks as part of the URL
that's generated when a webhook is registered, webhooks can create messages without a service account or
user authentication.
SpacesResource.MessagesResource.DeleteRequest
Deletes a message. For an example, see Delete a
message. Requires
authentication. Fully supports service account
authentication and user
authentication. User
authentication requires the chat.messages
authorization scope.
SpacesResource.MessagesResource.GetRequest
Returns details about a message. For an example, see Read a
message. Requires
authentication. Fully supports service account
authentication and user
authentication. User
authentication requires the chat.messages
or chat.messages.readonly
authorization scope. Note: Might return a message from a blocked member or
space.
SpacesResource.MessagesResource.ListRequest
Lists messages in a space that the caller is a member of, including messages from blocked members and
spaces. For an example, see List messages. Requires user
authentication and the chat.messages
or
chat.messages.readonly
authorization scope. This method is only supported in spaces that don't allow
users from outside the Workspace organization to join.
SpacesResource.MessagesResource.PatchRequest
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. Requires
authentication. Fully supports service account
authentication and user
authentication. User
authentication requires the chat.messages
authorization scope.
SpacesResource.MessagesResource.ReactionsResource
The "reactions" collection of methods.
SpacesResource.MessagesResource.ReactionsResource.CreateRequest
Creates a reaction and adds it to a message. For an example, see Create a
reaction. Requires user
authentication and the chat.messages
,
chat.messages.reactions
, or chat.messages.reactions.create
scope. Only unicode emoji are
supported.
SpacesResource.MessagesResource.ReactionsResource.DeleteRequest
Deletes a reaction to a message. For an example, see Delete a
reaction. Requires user
authentication and the chat.messages
or
chat.messages.reactions
scope.
SpacesResource.MessagesResource.ReactionsResource.ListRequest
Lists reactions to a message. For an example, see List
reactions. Requires user
authentication and chat.messages
,
chat.messages.readonly
, chat.messages.reactions
, or chat.messages.reactions.readonly
scope.
SpacesResource.MessagesResource.UpdateRequest
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. Requires
authentication. Fully supports service account
authentication and user
authentication. User
authentication requires the chat.messages
authorization scope.
SpacesResource.PatchRequest
Updates a space. For an example, see Update a
space. Requires user
authentication and the chat.spaces
scope.
SpacesResource.SetupRequest
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. To specify the human members to add,
add memberships with the appropriate member.name
in the SetUpSpaceRequest
. To add a human user, use
users/{user}
, where {user}
is either the {person_id}
for the
person from the People API, or the id
for the
user in the Admin SDK Directory
API. For example, if the People API Person
resourceName
is people/123456789
, you can add the user to
the space by including a membership with users/123456789
as the member.name
. For a space or group chat,
if the caller blocks or is blocked by 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 create a
membership. 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 or guest access aren't supported. Requires user
authentication and the chat.spaces.create
or
chat.spaces
scope.
Enums
HangoutsChatBaseServiceRequest<TResponse>.AltEnum
Data format for response.
HangoutsChatBaseServiceRequest<TResponse>.XgafvEnum
V1 error format.
MediaResource.UploadMediaUpload.AltEnum
Data format for response.
MediaResource.UploadMediaUpload.XgafvEnum
V1 error format.
SpacesResource.MessagesResource.CreateRequest.MessageReplyOptionEnum
Optional. Specifies whether a message starts a thread or replies to one. Only supported in named spaces.