window.PaperlinkAIChat.init. Use the attributes for a standard install. Use init when you need an option that has no attribute, as Start the widget from your code explains.
- Script tag attributes
- init options
string
Your API key. The key starts with
pl_live_ for production. With this attribute, the tag starts a floating widget. Without it, the tag starts no widget and you call init.string
default:"the URL of the script without /widget.js"
The API base URL that the widget calls. Most sites never set this attribute.
string
Overrides the Turnstile site key. Without this attribute, the widget uses the key from your bot configuration. Production ignores this value and always uses the Paperlink AI key.
string
Set the value to
"true" to open the widget when the page loads.Where appearance lives
The bot name, brand color, logo, welcome message and widget position are dashboard settings. Change them in the dashboard, as Appearance explains. The widget has no theme, CSS or locale options.
Errors that init throws
init checks your options before it mounts the widget. It throws one of these errors.
JavaScript API
Control the widget from your own code with open, close, resetSession and destroy.