<script> tag. Visitors can start conversations anonymously, or you can verify their identity with a server-signed JWT so the widget loads with their profile attached.
Create a live chat inbox
1
Add the inbox
Go to Admin → Inboxes → New inbox → Live Chat. Fill in the name, brand name, and website URL.
2
Configure appearance and messages
Set the colors, launcher, greeting, and home screen under the Appearance and Content tabs. All changes are live as soon as you save.
3
Copy the install snippet
Open the Setup tab, expand Installation and copy the
<script> snippet shown there. Paste it before the closing </body> tag on every page where the widget should appear.Install the widget
The anonymous snippet looks like this:baseURL is the URL of your libredesk instance. inboxID is the inbox UUID, already filled in by the snippet on the Setup tab.
Anyone visiting the page can now open the widget and start a conversation. A visitor is remembered in the same browser. To recognize signed-in users across devices, add identity verification.
Widget settings
window.LibredeskSettings accepts these keys:
Identity verification
If users are already signed into your product, pass a signed JWT so the widget loads with their existing libredesk contact. Without verification, the widget cannot tell a returning user apart from a new visitor on a new device.How it works
- Your server signs a JWT with the inbox Secret key (set under Setup → Security).
- Your page passes that JWT to the widget via
userJWT, or callsLibredesk.setUser(jwt). - libredesk verifies the signature, then finds or creates the contact by
external_user_id.
JWT payload
Sign the token on your server
Pass the token to the widget
JavaScript API
Once the widget loads,window.Libredesk exposes these methods:
Example:
Proactive messages
A proactive message pops up next to the launcher on matching pages. A conversation starts when someone replies. Add them under Content → Proactive messages. The first matching message in the list is shown.
Minimum time between proactive messages (default
24h) applies across all proactive messages in the inbox.
Help articles in the widget
Under Content → Help center, pick one of your help centers to let people search and read its published articles inside the widget.- Show Help tab turns the Help tab on or off, separately for visitors and users.
- Featured articles picks the articles shown first. Leave it empty to show popular articles.
- To show help on the home screen, add the help articles card under Content → Home screen apps.
Pre-chat form
Under Conversations → Pre-chat form, collect details such as name, email, and custom attributes before a chat starts. Turn on Show only during AI handoff to show the form only when the AI assistant hands the chat to an agent.Conversation continuity
If a contact leaves the live chat before the conversation is finished, libredesk can email them the agent replies they have not seen. Pick an email inbox under General → Conversation continuity email inbox to turn this on. The contact needs an email address.
Replies to the email thread are added back to the same live chat conversation.
Security
These settings are under Setup → Security.Trusted domains
List the domains allowed to embed the widget, one per line.*.example.com matches subdomains only, so add the bare domain separately:
Blocked IPs
Block specific IPs or CIDR ranges from opening the widget, one per line:Session duration
Authenticated user session duration controls how long a signed-in user’s session lasts without activity. Default is10h. Format accepts s, m, h (e.g. 30m, 24h).
