0

我试图一个接一个地向同一个主题机器人写两条不同的消息。但是任何时候发布具有相同标题的新主题。

我使用 rest api post call 并尝试了这个:

curl --insecure -X POST https://yourcircuit.com/rest/v2/webhooks/incoming/xxxx -d '{"text": "foobar1", "subject": "My fancy title"}'
curl --insecure -X POST https://yourcircuit.com/rest/v2/webhooks/incoming/xxxx -d '{"text": "foobar2", "subject": "My fancy title"}'

我假设电路对话中同一标题框下有两条消息。

什么是节目:
在此处输入图像描述

我想要达到的目标:
在此处输入图像描述

有谁知道如何做到这一点?

4

2 回答 2

0

webhook 不支持该功能。这可以通过常规 REST API /conversations/{convId}/messages/{itemId} 来完成。见https://circuitsandbox.net/rest/v2/swagger/ui/index.html

于 2020-06-22T16:28:09.683 回答
0

您可以使用https://circuitsandbox.net/rest/v2/swagger/ui/index.html上的 swagger ui 尝试此操作

在此处输入图像描述

下面是对应的http请求:

curl -X POST "https://circuitsandbox.net/rest/v2/conversations/05bd75f1-a8d5-40c0-b24a-28710ec1a57f/messages/cde0b57e-7f1d-4ffb-b2af-a1b7c7c9fa06" \
-H "accept: application/json" \
-H "authorization: Bearer ot-4f70c19edc6f43c4b89b4d39b4440000" \
-H "content-type: application/x-www-form-urlencoded" \
-d "content=hello"

请注意,上面的令牌已失效。您需要使用自己的对话 ID、父项 ID 和访问令牌。

这是它在电路中的外观: 在此处输入图像描述

于 2020-06-23T18:28:14.187 回答