Picking of chat start URL

Hi,

can anyone help me to pull out the chat start URL through webhook?

Hey Akhil,

Most of LiveChat webhooks include the chat_started_url in “Chats” object, that you can select when creating a webhook in the app (screenshot: https://take.ms/DPyxv), ticket_created action will also include the URL.

I recommend using V3 webhooks, those when related to Chat will include the URL as well, but it depends what you would like to be the trigger. Full documentation is available here: https://developers.livechatinc.com/docs/management/configuration-api/#chats

The easiest way to check the full payload of a webhook is to use a website like https://webhook.site/ to generate an URL that will capture webhook data and display it instantly.

Here’s an example part of webhook payload that includes the URL:
{
“event_type”: “chat_ended”,
“event_unique_id”: “21d8ed77bffd0bad90e8544e190bd088”,
“token”: “XXXXXXXX”,
“license_id”: “XXXXX”,
“lc_version”: “3”,
“chat”: {
“id”: “Q1VMVI9ZEX”,
“started_timestamp”: 1574851245,
“ended_timestamp”: 1574851253,
“url”: “https://cdn.livechatinc.com/preview/XXXXX/”,
“referer”: “”,
“messages”: [

Hope that helps!