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.

OptionDefaultDescription
apiKeyN/AYour unique AsroChat API key.
botIdN/AThe unique ID for your bot.

Branding & UI

Customize the look and feel of your widget.

OptionDefaultDescription
primaryColor#000000Primary brand color.
welcomeMessageHow can I help you?Initial greeting from the bot.
titleAssistantHeader title.
subtitleOnlineHeader subtitle (e.g., response time).
themelightWidget visual theme.

Positioning

Control where the widget appears.

OptionDefaultDescription
positionrightScreen alignment side.
zIndex9999Depth of the widget on screen.

Bot Logic

Advanced behavior and session state.

OptionDefaultDescription
rememberSessiontruePersists chat history.
autoOpenfalseAuto-expands widget.
delay0Delay 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.

Read FAQ →