Back to All

Live chat via api

We are trying to integrate our app's chat functionality with snatchbot.

In the process, we use snatchbot API to make a POST request with user's message and get bot's response.

For example, on sending the following post request:

curl --request POST \
  --url 'https://account.snatchbot.me/channels/api/api/id<bot_id>/app<app_id>/aps<app_secret>?user_id=<user_id>' \
  --data '{"message": "Hi"}' \ 
--header 'content-type: application/json'

The response from bot is:

{
  "cards": [
    
  ],
  "messages": [
    {
      "message": "Hi. I'm your bot. What would you like to know today?",
      "speech": ""
    }
  ],
  "status": true,
  "suggested": [
    "Nothing",
    "Live Chat",
    "About Apples"
  ]
}

Till here it works great.

Problem arises when the user asks for live chat. The messages being sent by the admin from the live chat inbox don't appear in JSON results above.

How can I get the live chat messages via API?

Thanks