Connecting LiveChat with 3rd party chat bot for live agent transfer

Hi - I am using a 3rd party chatbot (kore.ai) on my site. This is through their own chat widget. In the event that the user needs to speak with a human, I need to integrate the bot’s backend with a live chatting software.

So, I’ve been evaluating LiveChat for this purpose. I’ve been reading through the documentation and have found APIs that allow for creating a chat and sending messages. However, they all require an access token in the header, which seems to be something the client itself has to obtain.

In my case I need my server to initiate the chat, send the chat message, and return chat responses back to the client. So customers won’t ever directly touch LiveChat.

So, how is this done with the v3 API? I was following a tutorial that uses outdated LiveChat APIs that handled exactly what I’m trying to do. Example outdated API calls:
https://api.livechatinc.com/visitors/{visitorId}/chat/start
https://api.livechatinc.com/visitors/{visitorId}/chat/send_message

Thanks for any assistance.

Hello @jobe.makar :slight_smile:

If you create a back-end application that will receive chats from your bot and then will pass them over to LiveChat, you can authorize those requests with the use of the Public server-side apps authorization -> here’s a link that describes the process of authorizing API calls: https://developers.livechatinc.com/docs/getting-started/authorization/#public-server-side-apps

Basically by implementing the authorization process in your back-end app, when using their chat widget you won’t have to do anything at your side, as the authorization process will be handled by the app itself. This process includes generating the access_token that will be used to, for example, start chats at LiveChat (and authorize their calls), and generating the refresh_token that will allow you to obtain a new access token ( access_token will expire after 8 hours)

Let me know if that helps!