【问题标题】:How to send response through webhook in hangouts chat to the same thread如何在环聊聊天中通过 webhook 将响应发送到同一线程
【发布时间】:2019-11-20 09:01:13
【问题描述】:

我可以通过应用程序脚本通过 webhook 向聊天室发送消息,但是我如何发送回复该消息。这是一种单向聊天方式。我怎样才能通过 webhook 将其作为对话流.

【问题讨论】:

标签: webhooks hangouts-chat


【解决方案1】:

您可以提供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

【讨论】:

    猜你喜欢
    • 2018-11-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-10-13
    • 2015-03-02
    • 2012-12-29
    相关资源
    最近更新 更多