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.
- AccessSettings
- Represents the access setting of the space.
- 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. - ChatSpaceLinkData
- Data for Chat space links.
- CompleteImportSpaceResponse
- Response message for completing the import process for a space.
- CustomEmoji
- Represents a custom emoji.
- CustomEmojiMetadata
- Annotation metadata for 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.
- GoogleAppsCardV1Carousel
- Developer Preview: A carousel, also known as a slider, rotates and displays a list of widgets in a slideshow format, with buttons navigating to the previous or next widget.
- GoogleAppsCardV1CarouselCard
- Developer Preview: A card that can be displayed as a carousel item.
- GoogleAppsCardV1Chip
- A text, icon, or text and icon chip that users can click.
- GoogleAppsCardV1ChipList
- A list of chips layed out horizontally, which can either scroll horizontally or wrap to the next line.
- GoogleAppsCardV1CollapseControl
- Represent an expand and collapse control.
- 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.
- GoogleAppsCardV1NestedWidget
-
Developer Preview: A list
of widgets that can be displayed in a containing layout, such as a
CarouselCard
. - 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. - GoogleAppsCardV1OverflowMenu
- A widget that presents a pop-up menu with one or more actions that users can invoke.
- GoogleAppsCardV1OverflowMenuItem
- An option that users can invoke in an overflow menu.
- 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.
- GoogleAppsCardV1Validation
- Represents the necessary data for validating the widget it's attached to.
- 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.
- MembershipCount
- Represents the count of memberships of a space, grouped into categories.
- 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.
- PermissionSetting
- Represents a space permission setting.
- PermissionSettings
- Permission settings that you can specify when updating an existing named space.
- 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.
- SearchSpacesResponse
- Response with a list of spaces corresponding to the search spaces request.
- 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
- Metadata about 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.
- SpaceNotificationSetting
- The notification setting of a user in a 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
-
For
selectionInput
widgets, returns autocomplete suggestions for a multiselect menu. - 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
- UsersSpacesSpaceNotificationSettingResource
- 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.