LiveChat provides an online customer service software with live support, web analytics, and online marketing capabilities. The analysis of live chat transcripts and customer queries allows businesses to understand common customer issues, gauge satisfaction levels, and identify areas for service improvement.
Welcome to the LiveChat documentation for Dashbot! Integrating Dashbot into your LiveChat chatbot is quick and easy.
Set Up LiveChat API
Get LiveChat API Credentials: Log in to your LiveChat account and go to the API section to get your API key.
You can create your PAT (Personal Access Token) inside Developer Console. Just go to the section Tools > Personal Access Tokens and create a new PAT.
Next, use the key as your password.
GET Conversations from LiveChat
Use the LiveChat Conversations API endpoint. For example,
https://api.livechatinc.com/v3.5/agent/action/list_chats
Go to the 'Authorization' tab, select 'API Key' from the type dropdown. Enter your LiveChat API key.
{
"Authorization": "Bearer YOUR_LIVECHAT_API_KEY"
}
Go to the Headers section and add the KEY Content-Type and its VALUE application/json. and then structure the GET request
curl --location --request POST 'https://api.livechatinc.com/v3.5/agent/action/list_archives' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic XXXXX' \
--data-raw '{}'
POST responses to Dashbot
When your chat receives a message, post the data to the following endpoint:
https://tracker.dashbot.io/track?platform=universal&v=10.1.1-rest&type=incoming&apiKey=API_KEY_HERE
Make sure to set the ‘Content-Type’ header to ‘application/json’ and to replace API_KEY_HERE
with your api key.
The data to POST should pass the following data:
{
"text": "Hi, bot",
"userId": "+14155551234",
"platformJson": {
"whateverJson": "any JSON specific to your platform can be stored here"
}
}
Sample cURL
curl -X POST -H "Content-Type: application/json"
-d '{"text":"Hi, bot","userId":"+14155551234","platformJson":{"whateverJson":"any JSON specific to your platform can be stored here"}}'
'https://tracker.dashbot.io/track?platform=sms&v=11.1.0-rest&type=incoming&apiKey=API_KEY'
Notice, you must replace the placeholder API_KEY_HERE
above with your api key.