What is this widget script?
This project is responsible for including the registry in third-party applications.Using the script widget
To use the widget it is necessary to include our JS in your application. The basic configuration for adding the widget is the script below. Add the script below to your application:Widget Information
You can get the SCRIPT_URL and COMPANY_SLUG from the dashboard at:Account > Widget > Widget script
In the widget screen you can customize the widget.
Test environment
For people to see the “sandbox” warning they would have to pass this parameter. This does not interfere with the operation, only the token makes this enter production and sandbox rule. It’s just a warning. The script with this parameter will look like this:Events (experimental)
Event | Description |
---|---|
registerWithSuccess | Fired when the integration was successful. |
errorOnRegister | Fired when there was an error sending user data. |
Using the events
To use events we must usewindow.Satws.subscribe
to subscribe to widget events.
Example:
registerWithSuccess:
errorOnRegister: