Skip to content

JS Widget SDK

The widget SDK allows you to run the Botsquad chat widget on your site.

Installation and configuration

Please consult the Chat widget documentation on how to install and configure the widget for your website.


Once loaded the SDK exposes a global BotSqd object which has the following functions:

BotSqd.event(name, payload)

Send an event to the chat. The chat window needs to be opened already.


Open the chat widgets when it was closed.


Closes the chat widget when it was open.


Set the user ID that is to be used in the chat. This will re-open the chat window when the user id changes. When the widget it still closed, nothing happens.


Retrieve the current user id that will be sent to Botsquad.