Skip to content

Install the widget

Use the widget version that matches your Snipet server: widget x.y.z for server x.y.z.

<script src="https://unpkg.com/@snipet/widget@x.y.z/dist/widget.js"></script>
<script>
SnipetWidget.init({
apiUrl: "https://snipet.example.com",
appId: "<your app id>",
agentId: "<your agent id>",
});
</script>

Loading the script only defines window.SnipetWidget. Nothing shows up until init().

appId alone works for apps that allow anonymous users. To chat as your signed-in users, pass a token instead.