hangouts-chat

Error 400: invalid_scope “https://www.googleapis.com/auth/chat.bot”

扶醉桌前 提交于 2020-08-24 07:43:30
问题 The documentation for the new google hangouts chat says that you need to authorize the scope https://www.googleapis.com/auth/chat.bot to do pretty much anything. Here's the error: While generating an authentication URL using their OAuth2 client I get the message that the scope is invalid. I don't have that problem if I use https://www.googleapis.com/auth/chat or some other scope like the one for google plus. When I try to google things on in the API Explorer no combination of the URL or parts

Posting a Webhook to Existing Thread

人盡茶涼 提交于 2020-04-16 06:13:02
问题 Trying to figure out how to have a post a webhook message in Hangouts Chat to an existing thread in a chat room. When I post to the webhook URL, I get the following response: { "name": "spaces/123123123123/messages/128391203812903809128", "sender": { "name": "users/u4i3u4oi32u5oi23u4o23", "displayName": "Mecha", "avatarUrl": "", "email": "", "type": "BOT" }, "text": "", "cards": [ { "header": { "title": "Some Title", "subtitle": "Some Subtitle", "imageStyle": "IMAGE", "imageUrl": "Some Image

Posting a Webhook to Existing Thread

徘徊边缘 提交于 2020-04-16 06:11:12
问题 Trying to figure out how to have a post a webhook message in Hangouts Chat to an existing thread in a chat room. When I post to the webhook URL, I get the following response: { "name": "spaces/123123123123/messages/128391203812903809128", "sender": { "name": "users/u4i3u4oi32u5oi23u4o23", "displayName": "Mecha", "avatarUrl": "", "email": "", "type": "BOT" }, "text": "", "cards": [ { "header": { "title": "Some Title", "subtitle": "Some Subtitle", "imageStyle": "IMAGE", "imageUrl": "Some Image

How can I react to a message with a pub/sub bot

别说谁变了你拦得住时间么 提交于 2020-02-24 16:47:08
问题 I have created a Card with a button and a onClick action that successfully sends a message to my client with type "CARD_CLICKED". When I try to respond to this message with either a type "NEW_MESSAGE" or "UPDATE_MESSAGE" message, this is displayed as a new message, while the API tries for three times to send that CARD_CLICKED event to my bot until it gives up with the visual error: "Unable to contact [bot]. Try again later." I guess this is similar to Interactive button doesn't work properly

Interactive cards hangout chat Api

我与影子孤独终老i 提交于 2020-01-05 05:47:10
问题 I'm using interactive card to send a message async to hangout chat API, and I used onClick.action but, when I do the action and click the button, I receive this error: CARD_CLICKED_ERROR: Not that I handled card_click event type by adding actionResponse to a NEW_MESSAGE in reply message. 来源: https://stackoverflow.com/questions/51631989/interactive-cards-hangout-chat-api

Interactive button doesn't work properly when using pub/sub

泄露秘密 提交于 2019-12-22 18:38:11
问题 I'm writing a Hangouts Chat bot in C# that uses pub/sub so I can host the bot on our side of a firewall. Everything seems to work well except interactive buttons within cards. If I create a button with a specific action method name, the bot does receive the CARD_CLICKED message with the appropriate action method name. However, it doesn't seem like the card in the Hangouts Chat app knows a response was sent because the bot ends up getting the CARD_CLICKED message three times before the

Google Hangouts Chat bot to send DMs via incoming webhook?

℡╲_俬逩灬. 提交于 2019-12-22 12:37:52
问题 Is it possible to set up this simple bot, using an incoming webhook, but send the message as a DM (not a @mention) to specific user(s)? My guess is no. But then how could I achieve this? Right now, the message is just sent into the room in which the bot was added and I can't see anything on DMs in the messaging docs. You can currently achieve this very easily in Slack by setting up a so called bot user and using their chat.postMessage but I would like to do this in Google Hangouts Chat

Is it possible to @mention a bot from a message sent via a webhook in Hangouts Chat?

不想你离开。 提交于 2019-12-12 01:15:39
问题 I have a fully implemented bot to perform some incident management for my group. We also use webhook 'bots' to post system status updates to the same room. I would like to have the webhook messages @mention the full bot to kick off an incident in certain circumstances. When I test @mentions from the webhook using my own user_id , it works fine. When I try to @mention the bot using what looks to me to be its user_id , it doesn't get translated to the bot's username and it doesn't trigger an

Hangout bot how to @mention user in a card message

守給你的承諾、 提交于 2019-12-11 17:22:15
问题 I've created a bot that is supposed to inform users from a group about the tasks they were assigned to. It is working well with the simple message using but it's not working once put in a card message - I got "---" or "???" instead of mention. I tried to put it in different widgets: keyValue, textParagrap or header but it doesn't change anything. Does anyone know if it's possible at all? 回答1: A review of the API description should have confirmed your suspicions - at this moment, you cannot

Google Hangouts Chat API IP to Whitelist?

一曲冷凌霜 提交于 2019-12-11 16:19:16
问题 I am building a bot that will interact with the Google Hangouts Chat API. I need to punch a hole in my firewall to receive incoming HTTPS requests. Is there a subnet I can expect Google to send requests from? I would rather not open the bot to the entire world. For organizational reasons, we cannot use pub/sub endpoints. We just need an ip or ip range from google to whitelist 来源: https://stackoverflow.com/questions/50068130/google-hangouts-chat-api-ip-to-whitelist