chat/v1 library
Google Chat API - v1
Enables apps to fetch information and perform actions in Google Chat. Authentication is a prerequisite for using the Google Chat REST API.
For more information, see developers.google.com/hangouts/chat
Create an instance of HangoutsChatApi to access these resources:
Classes
- 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
- 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
- Widgets for Chat apps to specify.
- ChatClientDataSourceMarkup
- Chat apps only.
- 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.
- 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
- Cards support a defined layout, interactive UI elements like buttons, and rich media like images.
- 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 message 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.
- 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
- Chat apps only.
- 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.
- HangoutsChatApi
- Enables apps to fetch information and perform actions in Google Chat.
- HostAppDataSourceMarkup
- Chat apps only.
- 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
- ListMessagesResponse
- ListReactionsResponse
- ListSpacesResponse
- 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.
- Message
- A message in Google Chat.
- 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.
- ResumableUploadOptions
- Specifies options for resumable uploads.
- Section
- A section contains a collection of widgets that are rendered (vertically) in the order that they are specified.
- SetUpSpaceRequest
- SlashCommand
- A slash command in Google Chat.
- SlashCommandMetadata
- Annotation metadata for slash commands (/).
- Space
- A space in Google Chat.
- SpaceDataSource
- A data source representing a Google Chat space.
- SpaceDetails
- Details about the space including description and rules.
- SpacesMembersResource
- SpacesMessagesAttachmentsResource
- SpacesMessagesReactionsResource
- SpacesMessagesResource
- SpacesResource
- TextButton
-
A button with text and
onclick
action. - TextParagraph
- A paragraph of text.
- Thread
- A thread in Google Chat.
- UploadAttachmentRequest
- UploadAttachmentResponse
- UploadOptions
- Represents options for uploading a Media.
- User
- A user in Google Chat.
- UserMentionMetadata
- Annotation metadata for user mentions (@).
- 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.
- 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.