DocsConfiguration
SDK Configuration
The `init` method accepts a configuration object that controls how the SDK connects to your chatbot and how it behaves on your page.
Configuration Options
| Option | Type | Required | Description |
|---|---|---|---|
| subdomain | string | Yes | Your chatbot's unique identifier (e.g., 'my-bot'). |
| apiUrl | string | No | Custom backend API URL if you are self-hosting. |
| userContext | object | No | Metadata about the current user to personalize the chat. |
| debug | boolean | No | Enable verbose logging in the console (default: false). |
| widgetShape | 'circle' | 'rounded-square' | No | Shape of the floating widget button (default: 'circle'). |
| widgetSize | 'small' | 'medium' | 'large' | No | Size of the floating widget button (default: 'medium'). |
Advanced Example
init({
subdomain: 'support-bot',
userContext: {
userName: 'John Doe',
plan: 'premium'
},
widgetShape: 'rounded-square',
widgetSize: 'large',
debug: true
});
subdomain: 'support-bot',
userContext: {
userName: 'John Doe',
plan: 'premium'
},
widgetShape: 'rounded-square',
widgetSize: 'large',
debug: true
});