chat/v1 library
Google Chat API - v1
The Google Chat API lets you build Chat apps to integrate your services with Google Chat and manage Chat resources such as spaces, members, and messages.
For more information, see developers.google.com/hangouts/chat
Create an instance of HangoutsChatApi to access these resources:
Classes
- AccessoryWidget
- One or more interactive widgets that appear at the bottom of a message.
- ActionResponse
- Parameters that a Chat app can use to configure how its response is posted.
- ActionStatus
- Represents the status for a request to either invoke or submit a dialog.
- Annotation
- Annotations associated with the plain-text body of the message.
- AttachedGif
- A GIF image that's specified by a URL.
- Attachment
- An attachment in Google Chat.
- AttachmentDataRef
- A reference to the attachment data.
- Button
- A button.
- ByteRange
- Specifies a range of media.
- Card
- A card is a UI element that can contain UI widgets such as text and images.
- CardAction
- A card action is the action associated with the card.
- CardHeader
- CardWithId
- A card in a Google Chat message.
- ChatClientDataSourceMarkup
-
For a
SelectionInput
widget that uses a multiselect menu, a data source from Google Chat. - CompleteImportSpaceResponse
- Response message for completing the import process for a space.
- CustomEmoji
- Represents a custom emoji.
- DeletionMetadata
- Information about a deleted message.
- Dialog
- Wrapper around the card body of the dialog.
- DialogAction
- Contains a dialog and request status code.
- DownloadOptions
- Represents options for downloading media.
- DriveDataRef
- A reference to the data of a drive attachment.
- DriveLinkData
- Data for Google Drive links.
- Emoji
- An emoji that is used as a reaction to a message.
- EmojiReactionSummary
- The number of people who reacted to a message with a specific emoji.
- FormAction
- A form action describes the behavior when the form is submitted.
- GoogleAppsCardV1Action
- An action that describes the behavior when the form is submitted.
- GoogleAppsCardV1BorderStyle
- The style options for the border of a card or widget, including the border type and color.
- GoogleAppsCardV1Button
- A text, icon, or text and icon button that users can click.
- GoogleAppsCardV1ButtonList
- A list of buttons layed out horizontally.
- GoogleAppsCardV1Card
- A card interface displayed in a Google Chat message or Google Workspace Add-on.
- GoogleAppsCardV1CardAction
- A card action is the action associated with the card.
- A persistent (sticky) footer that that appears at the bottom of the card.
- GoogleAppsCardV1CardHeader
- Represents a card header.
- GoogleAppsCardV1Column
- A column.
- GoogleAppsCardV1Columns
-
The
Columns
widget displays up to 2 columns in a card or dialog. - GoogleAppsCardV1DateTimePicker
- Lets users input a date, a time, or both a date and a time.
- GoogleAppsCardV1DecoratedText
- A widget that displays text with optional decorations such as a label above or below the text, an icon in front of the text, a selection widget, or a button after the text.
- GoogleAppsCardV1Grid
- Displays a grid with a collection of items.
- GoogleAppsCardV1GridItem
- Represents an item in a grid layout.
- GoogleAppsCardV1Icon
- An icon displayed in a widget on a card.
- GoogleAppsCardV1Image
-
An image that is specified by a URL and can have an
onClick
action. - GoogleAppsCardV1ImageComponent
- Represents an image.
- GoogleAppsCardV1ImageCropStyle
- Represents the crop style applied to an image.
- GoogleAppsCardV1MaterialIcon
- A Google Material Icon, which includes over 2500+ options.
- GoogleAppsCardV1OnClick
- Represents how to respond when users click an interactive element on a card, such as a button.
- GoogleAppsCardV1OpenLink
-
Represents an
onClick
event that opens a hyperlink. - GoogleAppsCardV1PlatformDataSource
-
For a
SelectionInput
widget that uses a multiselect menu, a data source from Google Workspace. - GoogleAppsCardV1Section
- A section contains a collection of widgets that are rendered vertically in the order that they're specified.
- GoogleAppsCardV1SelectionInput
- A widget that creates one or more UI items that users can select.
- GoogleAppsCardV1SelectionItem
- An item that users can select in a selection input, such as a checkbox or switch.
- GoogleAppsCardV1SuggestionItem
- One suggested value that users can enter in a text input field.
- GoogleAppsCardV1Suggestions
- Suggested values that users can enter.
- GoogleAppsCardV1SwitchControl
-
Either a toggle-style switch or a checkbox inside a
decoratedText
widget. - GoogleAppsCardV1TextInput
- A field in which users can enter text.
- GoogleAppsCardV1TextParagraph
- A paragraph of text that supports formatting.
- GoogleAppsCardV1Widget
- Each card is made up of widgets.
- GoogleAppsCardV1Widgets
- The supported widgets that you can include in a column.
- Group
- A Google Group in Google Chat.
- HangoutsChatApi
- The Google Chat API lets you build Chat apps to integrate your services with Google Chat and manage Chat resources such as spaces, members, and messages.
- HostAppDataSourceMarkup
-
For a
SelectionInput
widget that uses a multiselect menu, a data source from a Google Workspace application. - Image
-
An image that's specified by a URL and can have an
onclick
action. - ImageButton
-
An image button with an
onclick
action. - KeyValue
- A UI element contains a key (label) and a value (content).
- ListMembershipsResponse
- Response to list memberships of the space.
- ListMessagesResponse
- Response message for listing messages.
- ListReactionsResponse
- Response to a list reactions request.
- ListSpaceEventsResponse
- Response message for listing space events.
- ListSpacesResponse
- The response for a list spaces request.
- MatchedUrl
- A matched URL in a Chat message.
- MediaResource
- Membership
- Represents a membership relation in Google Chat, such as whether a user or Chat app is invited to, part of, or absent from a space.
- MembershipBatchCreatedEventData
- Event payload for multiple new memberships.
- MembershipBatchDeletedEventData
- Event payload for multiple deleted memberships.
- MembershipBatchUpdatedEventData
- Event payload for multiple updated memberships.
- MembershipCreatedEventData
- Event payload for a new membership.
- MembershipDeletedEventData
- Event payload for a deleted membership.
- MembershipUpdatedEventData
- Event payload for an updated membership.
- Message
- A message in a Google Chat space.
- MessageBatchCreatedEventData
- Event payload for multiple new messages.
- MessageBatchDeletedEventData
- Event payload for multiple deleted messages.
- MessageBatchUpdatedEventData
- Event payload for multiple updated messages.
- MessageCreatedEventData
- Event payload for a new message.
- MessageDeletedEventData
- Event payload for a deleted message.
- MessageUpdatedEventData
- Event payload for an updated message.
- OnClick
-
An
onclick
action (for example, open a link). - OpenLink
- A link that opens a new window.
- PartialDownloadOptions
- Options for downloading a Media.
- QuotedMessageMetadata
- Information about a quoted message.
- Reaction
- A reaction to a message.
- ReactionBatchCreatedEventData
- Event payload for multiple new reactions.
- ReactionBatchDeletedEventData
- Event payload for multiple deleted reactions.
- ReactionCreatedEventData
- Event payload for a new reaction.
- ReactionDeletedEventData
- Event payload for a deleted reaction.
- ResumableUploadOptions
- Specifies options for resumable uploads.
- RichLinkMetadata
- A rich link to a resource.
- Section
- A section contains a collection of widgets that are rendered (vertically) in the order that they are specified.
- SelectionItems
- List of widget autocomplete results.
- SetUpSpaceRequest
- Request to create a space and add specified users to it.
- SlashCommand
- A slash command in Google Chat.
- SlashCommandMetadata
- Annotation metadata for slash commands (/).
- Space
- A space in Google Chat.
- SpaceBatchUpdatedEventData
- Event payload for multiple updates to a space.
- SpaceDataSource
- A data source that populates Google Chat spaces as selection items for a multiselect menu.
- SpaceDetails
- Details about the space including description and rules.
- SpaceEvent
- An event that represents a change or activity in a Google Chat space.
- SpaceReadState
- A user's read state within a space, used to identify read and unread messages.
- SpacesMembersResource
- SpacesMessagesAttachmentsResource
- SpacesMessagesReactionsResource
- SpacesMessagesResource
- SpacesResource
- SpacesSpaceEventsResource
- SpaceUpdatedEventData
- Event payload for an updated space.
- TextButton
-
A button with text and
onclick
action. - TextParagraph
- A paragraph of text.
- Thread
- A thread in a Google Chat space.
- ThreadReadState
- A user's read state within a thread, used to identify read and unread messages.
- UpdatedWidget
- The response of the updated widget.
- UploadAttachmentRequest
- Request to upload an attachment.
- UploadAttachmentResponse
- Response of uploading an attachment.
- UploadOptions
- Represents options for uploading a Media.
- User
- A user in Google Chat.
- UserMentionMetadata
- Annotation metadata for user mentions (@).
- UsersResource
- UsersSpacesResource
- UsersSpacesThreadsResource
- WidgetMarkup
- A widget is a UI element that presents text and images.
Typedefs
- ActionParameter = $ActionParameter
- List of string parameters to supply when the action method is invoked.
- Color = $Color
- Represents a color in the RGBA color space.
- CompleteImportSpaceRequest = $Empty
- Request message for completing the import process for a space.
- Empty = $Empty
- A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs.
- GoogleAppsCardV1ActionParameter = $ActionParameter
- List of string parameters to supply when the action method is invoked.
- GoogleAppsCardV1Divider = $Empty
- Displays a divider between widgets as a horizontal line.
- Media = $Media
- Media resource.
Exceptions / Errors
- ApiRequestError
- Represents a general error reported by the API endpoint.
- DetailedApiRequestError
- Represents a specific error reported by the API endpoint.