Google Chat API overview

The Google Chat API includes a REST resource and Chat events.

REST resources grant access to Chat messages, spaces, and attachments.

Common uses of Chat REST resources include the following tasks:

  • Create, delete, and update messages.
  • List people and Chat bots conversing in a space.
  • List all the spaces your Chat bot has been added to.

Chat events let Chat bots receive and respond to events sent by Chat API, such as getting added to a space or messaged by a user. Chat bots receive a JSON-formatted payload of information about the event, such as what space the bot was added to, which the Chat bot uses to process and send a JSON-formatted response, such as a welcome message.

Here is a list of common terms used in the Google Chat API:

Message
A Chat message including the sender, space, text, attachments, and cards. A message is represented by a message resource.
Card
A UI element that can contain both interactive and static widgets such as text, images, and buttons. A card is represented by a card resource.
Space
A conversation between two or more users, or 1:1 messages between a user and a Chat bot. A space is represented by a space resource.
Event
An event represents actions that Chat bots can respond to, such as receiving messages, card clicks, and being added or removed from a space. Events are represented by the event type.
Membership
A user's inclusion in a space, including whether or not they have joined or have a pending invitation. Membership is represented by a membership resource.

Next steps

To get started with Google Chat API: