Google Chat API overview

Stay organized with collections Save and categorize content based on your preferences.

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 apps conversing in a space.
  • List all the spaces your Chat app has been added to.

Chat events let Chat apps receive and respond to events sent by Chat API, such as getting added to a space or messaged by a user. Chat apps receive a JSON-formatted payload of information about the event, such as what space the app was added to, which the Chat app 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:

A Chat message including the sender, space, text, attachments, and cards. A message is represented by a message resource.
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.
A conversation between two or more users, or 1:1 messages between a user and a Chat app. A space is represented by a space resource.
An event represents actions that Chat apps can respond to, such as receiving messages, card clicks, and being added or removed from a space. Events are represented by the event type.
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