The Visitor JS API allows you to load, access, and control the Floating Visitor UI inside your website. The API directly accesses and communicates with the loaded Unblu code. Any interaction with the API is reflected in the Floating Visitor UI. For example, if a conversation is opened via the API, it will also be visible in the Floating Visitor UI.
The Visitor JS API can only perform actions that the current visitor has the right to perform. For example, if a visitor is allowed to end a conversation, this may be done via the API. If not, an API call to end the conversation fails with an error.
The Visitor JS API is meant to be used for actions directly connected to the current visitor and that visitor’s usage of the Floating Visitor UI. This includes things like automatically starting a conversation or starting a call within a conversation that the visitor is already part of.
For actions that require rights beyond those the local visitor has, or that should be independent of the visitor’s UI, consider using the Unblu web API either directly in JS or via custom REST services provided by your own server.
The Embedded JS API is based on the Visitor JS API and provides similar functionality for the Embedded Visitor UI.
For information on how to integrate the JS APIs with your website, see:
The reference documentation is updated with the changes of the latest Unblu version.
The reference documentation includes examples to help get you started. Additional examples are available from our GitHub repository.
If you are running an older version of Unblu, you might prefer to view the documentation pages directly from your Unblu server. Those pages describe the JS APIs as they’re available on your server. To make the pages available, enable com.unblu.server.resources.enableDocResources.
You can find your local documentation pages at the following addresses: