Help with integrations with livechat sessions please

I’m trying to integrate some bot-like functionality into livechat sessions. I’m using the outgoing webhook to integrate with a separate process when a new message appear in webchats, and then use the response to append new content to the same chat. This works really nicely.

In the request sent to the webhook, there is a channel_id attribute.

“channel_id”:“2ebNqtRig59uvfn7s”

I’m assuming that if I want to further messages to the livechat, I’m able to do so using that same id, i.e.

$ curl -H “X-Auth-Token: …” -H “X-User-Id: …” -H “Content-type:application/json” http://localhost:3000/api/v1/chat.postMessage -d ‘{ “channel”: “2ebNqtRig59uvfn7s”, “text”: “test” }’

However I’m getting invalid channel messages.

Any tips please ?

I would appreciate it. Thanks.

Hi Rocket.Chaters, just wondering if there is any feedback for me ? many thanks.