如何在环聊聊天中通过 webhook 将响应发送到同一线程 [英] How to send response through webhook in hangouts chat to the same thread
本文介绍了如何在环聊聊天中通过 webhook 将响应发送到同一线程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可以通过应用程序脚本通过 webhooks 向聊天室发送消息,但是我如何发送对这些消息的回复.这是一种单向聊天.我怎样才能通过 webhooks 将其作为对话流.
I am able to send messages to chat room through webhooks by app script,But how can i send reply to that messages.It's being as a one way chat.How can i able to make that as a flow of conversation through webhooks.
推荐答案
您可以提供 threadKey
作为查询参数.您可以自己生成此密钥.具有相同 threadKey
的消息被组合在一起.
You can supply a threadKey
as query parameter. You can generate this key yourself. Messages with the same threadKey
are grouped together.
curl -H 'Content-Type: application/json' -X POST https://chat.googleapis.com/v1/spaces/<space>/messages?key=<key>\&token=<token>\&threadKey=this-thread-rocks --data '{"text": "hi there"}'
请参阅 https://developers.google.com/hangouts/chat/reference/rest/v1/spaces.messages/create 文档.
这篇关于如何在环聊聊天中通过 webhook 将响应发送到同一线程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文