如何通过环聊聊天中的Webhook发送响应到同一线程

问题描述 投票:0回答:1

我能够通过应用脚本通过webhooks将消息发送到聊天室,但是我如何发送对该消息的回复。这是一种单向聊天。我如何能够通过webhooks进行对话。

webhooks hangouts-chat
1个回答
0
投票

您可以提供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以获取文档。

© www.soinside.com 2019 - 2024. All rights reserved.