Questions tagged [google-chat-api]

Enables apps to fetch information and perform actions in Google Chat. Authentication is a prerequisite for using the Google Chat REST API.

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 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:

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 app. A space is represented by a space resource.

Event 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.

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.

33 questions
5
votes
2 answers

I am unable to get "configure webhook " option within google chat

As per the official documentation it lies inside chat room option. But its not available there.
Ankur Vaish
  • 149
  • 9
2
votes
0 answers

How to create Google Chat API configuration with terraform?

I would like to create a chatbot within my organization using Google Chat API as a terraform resource. I can create it on the console but I would like to provision it as a terraform resource. I couldn't find a google chat api resource or anything…
2
votes
0 answers

Google-Chat-API: Open dialog from posted message

I use bot to post cards with version 2 (сards_v2 property). Cards are rendered as normal, but I want to add a Button to open Dialog. This does not work. How can I achieve this? I post to POST /v1/chat/channels/:channel_id/messages? body: { …
2
votes
2 answers

Google Chat API: How do I switch between Cards v1 and Cards v2?

According to the docs, Cards v1 is deprecated, and Cards v2 seems to be much more feature-rich. But when I use the Cards v2 syntax, the API complains about unknown or missing fields. How can I tell the Google servers that I want to use the v2 API?…
1
vote
1 answer

What is the limit of Google Chat message card via chatbot

I am trying to create poll system that use message as the database like codelabs. Since the database is just a chat message, after there are a lot of data, the message is not updated. They called my endpoint successfully but the message is not…
1
vote
1 answer

create space/room and send message via google-api in node.js

Case: Google Chat support in node.js using the googleapis library. I studied the documentation, created a service account and implemented authentication. In first step I used the chat.spaces.list() method and it worked (no error returned). I want to…
1
vote
0 answers

Can't get Google Chat messages with Gmail API

What are the details of your problem? Until recently, in my own web application, I used the Gmail API to retrieve Google Chat messages as follows. I was able to get it from "Label: CHAT" by executing as follows. (1) Acquisition of thread ID…
1
vote
0 answers

This API is not accessible for external HTTP caller

Attempting to call google chat API in Postman on the developer's computer, we get the following response. { "error": { "code": 403, "message": "This API is not accessible for external HTTP caller.", "status": "PERMISSION_DENIED" } } We have…
AXMIM
  • 2,424
  • 1
  • 20
  • 38
1
vote
0 answers

How To send image to google Chat space from google cloud storage

I have a chat space where I need to send daily alerts of different computations performed. The alert can be a simple table or a plot (matplotlib Figure). From some research, I think its not possible to send local image (buffer) directly to chat…
1
vote
0 answers

Google Chat API: Async Response to Dialog

I use slash command with dialog option enabled. My goal is to provide user ability to search some object. Since search is not a fast action, I want to print in Dialog something like 'Please await'. And when search will be over - update Dialogs…
0
votes
0 answers

googlechat api get membership join event with Pubsub

I'm currently trying to build a python google chat bot using pubsub. I would like the bot to react to a user being added to the space, but it seem that googlechat do not push any membership event to pubsub. I know I correctly setup my endpoint as I…
scimunk
  • 73
  • 1
  • 7
0
votes
0 answers

Adding Google Chat cards_v2

I've been working on setting up a Google Chat App that produces a dialog to users when a command is invoked and then from that dialog based on the text entered it should produce a card into the thread that it originated from. That part seems to be…
0
votes
0 answers

Google chat app is not responding for image attachment

I am trying to save attachment uploaded by google chat app. I am handling two cases if user messages anything to google chat app, it will pop up a card with widgets which is perfectly fine but I am handling if user uploads attachment it will save…
0
votes
2 answers

How to automatically send direct message using google chat api based on a pub/sub trigger?

I'm creating a feedback bot that will send out direct messages to individuals as soon as an event on their calendar ends. For this, i've developed most of the code using appscript. I got the calendar api trigger working and i can get the same…
abtExp
  • 9
  • 1
  • 14
0
votes
1 answer

Create google chat space using api from postman

\`Hi, I am trying to create a space in google chat using api. So, for this I have configured OAuth2.0 and following details.Method: spaces.create" post methodHTTP Request: "https://www.googleapis.com/auth/chat.spaces.create"Authorization Scopes:…
1
2 3