Skip to main content

Prerequisites

  • A product ID for your integration (for example wko_de). Every product Libra serves has one; see Products and sources.
  • For npm installs, a WK Artifactory token in ARTIFACTORY_TOKEN. For the CDN, nothing.
  • Your page must not send X-Frame-Options: DENY or frame-ancestors 'none'; see step 4.

Get started

1

Install the SDK

Add the following to your .npmrc. You will need an ARTIFACTORY_TOKEN environment variable set to your WK Artifactory token.
2

Give the widget a place to live

The SDK positions its iframe over an element you own. Size that element however your layout needs: a side panel, a modal, a fixed corner.
3

Initialise once, attach when the user opens the chat

init() creates the iframe but makes no network requests. The chat session starts on the first attach(). Providing onClose gives the widget a Libra headbar with a close button; the callback hides your container and calls Libra.detach().
4

Allow the SDK's own iframe in your security headers

The chat renders in a blob: iframe generated by your page. Safari applies your page’s framing CSP to it, so SDK-enabled pages must allow it:
Details, including the microphone permission for voice input, are in Security headers.
Click Open Chat. The widget signs the user in through an Auth0 popup (or a Create account flow for new users), then renders the chat. The conversation, scroll position and any in-progress answer survive detach() / attach() cycles.

Next steps

How it works

Lifecycle, isolation and session persistence, in two minutes.

Embedding

Header ownership, stacking context, SPA route changes.

Authentication

Auth events, account gating, sign-out; or route everything through your own BFF with proxy mode.

Playground

Exercise every API call against staging without writing code.