Get the script that installs the chat launcher on a website
GET /Platform/chat/embed-loader
Get the script that installs the chat launcher on a website.
Returns JavaScript. Add it to a page with one tag,
<script src=".../chat/embed-loader?token=sh_..." async></script>; it
adds a launcher bubble in the corner configured on the chat flow and
opens the embed in a frame. The script loads the embed from the server
each time, so an installed site picks up changes without editing the tag.
Query parameters
token: optional str. The chat's share slug (sh_...).mode: optional str.chat(default) for text chat, orvoiceto open the embed in voice mode.
Returns
The JavaScript file. Sent as application/javascript, not JSON.
Example request
curl -X GET "https://api.hilus.ai/Platform/chat/embed-loader" \
-H "Authorization: Bearer $HILUS_API_KEY"