JavaScript Widget API
Control the chat widget programmatically using the window.Dexra object.
Initialization
import { Dexra } from '@dexra/client-sdk';
const chat = new Dexra({
appId: 'YOUR_APP_ID',
region: 'us-east-1'
});
Methods
chat.open()- Expands the widget.chat.close()- Minimizes the widget.chat.identify(userId, traits)- Logs in a user.