Widget Methods
Here is the list of methods that can be used to interact with the Widget
| Method | Description |
|---|---|
| create | Initializes the widget with the provided options, see Widget Params section |
| open | Opens the widget |
| close | Closes the widget |
| destroy | Unmounts the widget, it must be created again to be reused |
Widget Params​
Here is the list of keys in the params object that is passed when initializing the Widget with the .create(params) method
| Key | Type | Description |
|---|---|---|
| widgetToken | string | Session token required to initialize the widget, valid for 10 minutes. This token must be created using the widget token endpoint |
| publicKey | string | Public key used to initialize the widget. This must always be the same and it is used to verify the authenticity of the loaded widget |
| buttonMode | string | Whether you would like to use a personalized trigger of our widget, or use it with a button provided by us. The options can be 'hidden' | 'light' | 'dark' |
| widgetProps | object | Optional configurations:
|
| onSuccess | function | Refer to Widget Callbacks section |
| onEvent | function | Refer to Widget Callbacks section |
| onReject | function | Refer to Widget Callbacks section |