【发布时间】:2019-11-20 09:01:13
【问题描述】:
我可以通过应用程序脚本通过 webhook 向聊天室发送消息,但是我如何发送回复该消息。这是一种单向聊天方式。我怎样才能通过 webhook 将其作为对话流.
【问题讨论】:
我可以通过应用程序脚本通过 webhook 向聊天室发送消息,但是我如何发送回复该消息。这是一种单向聊天方式。我怎样才能通过 webhook 将其作为对话流.
【问题讨论】:
您可以提供threadKey 作为查询参数。您可以自己生成此密钥。具有相同threadKey 的消息被归为一组。
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。
【讨论】: