0

I am trying to write two different messages to the same subject bot after each other. But any time a new subject with the same title is posted.

I use the rest api post call and tried this:

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"}'

I assumed two messages under the same title box inside the circuit conversation.

What is shows:
enter image description here

What I want to achive:
enter image description here

Does anybody know how to achive this?

Lori
  • 155
  • 8

2 Answers2

0

That is not supported with webhooks. This could be done with the regular REST API /conversations/{convId}/messages/{itemId}. See https://circuitsandbox.net/rest/v2/swagger/ui/index.html

Roger Urscheler
  • 774
  • 2
  • 6
  • 11
0

You can try this using the swagger ui at https://circuitsandbox.net/rest/v2/swagger/ui/index.html

enter image description here

Here is the corresponding http request:

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"

Note that the token above has been invalidated. You need to use your own conversation ID, parent item ID and access token.

And here is how it looks in Circuit: enter image description here

Roger Urscheler
  • 774
  • 2
  • 6
  • 11
  • Thx. One question to the clientId and secret. Where can I get the clientid and secret. We are using circuit in our company. But when I logged in at the browser I don't see any setting tab to receive such a ID/secret. – Lori Jun 24 '20 at 10:43
  • See steps at https://circuit.github.io/ on how to get credentials. If you use a bot, then you'll have a client and secret. For an implicit app you only have the client id. – Roger Urscheler Jun 25 '20 at 13:10
  • We using a bot, but where can we get the client and secret of the bot? – Lori Jun 28 '20 at 07:39
  • With the circuit webclient in menu item "Manage Application" > "Custom apps" the tenant administrator can create new bots and their credentials. If you are not a tenant admin, then you need to check with your tenant admin. – Roger Urscheler Jun 29 '20 at 11:47