DocumentationConfiguration
SDK Configuration
The .init() method is your primary control point. By passing an options object, you can seamlessly integrate the AsroChat widget into your brand's unique design system.
Base Configuration
Template for a production-ready setup.
AsroChatSDK.init({
apiKey: 'ASRO_API_KEY_123',
botId: 'bot-uuid-999',
primaryColor: '#22c55e',
theme: 'dark',
title: 'Asro Support',
subtitle: 'Ready to help',
position: 'right',
rememberSession: true
});JSON-Style
Required Settings
Essential credentials for bot authentication.
| Option | Default | Description |
|---|---|---|
| apiKey | N/A | Your unique AsroChat API key. |
| botId | N/A | The unique ID for your bot. |
Branding & UI
Customize the look and feel of your widget.
| Option | Default | Description |
|---|---|---|
| primaryColor | #000000 | Primary brand color. |
| welcomeMessage | How can I help you? | Initial greeting from the bot. |
| title | Assistant | Header title. |
| subtitle | Online | Header subtitle (e.g., response time). |
| theme | light | Widget visual theme. |
Positioning
Control where the widget appears.
| Option | Default | Description |
|---|---|---|
| position | right | Screen alignment side. |
| zIndex | 9999 | Depth of the widget on screen. |
Bot Logic
Advanced behavior and session state.
| Option | Default | Description |
|---|---|---|
| rememberSession | true | Persists chat history. |
| autoOpen | false | Auto-expands widget. |
| delay | 0 | Delay in ms before loading. |
Events & Callbacks
Subscribe to lifecycle events to trigger custom website actions.
Success Handlers
AsroChatSDK.on('loaded', () => {
console.log('Bot is ready!');
});Interaction Hooks
AsroChatSDK.on('widgetToggled', ({ open }) => {
if (open) pauseAnimations();
});Have a complex use case?
Contact support for dedicated enterprise integration assist.