const options = {
mode: 'modal',
languageBaseUrl: '',
supportedLanguages: ['en', 'ru', 'es', 'fr'],
language: 'es', // Specifies the language of the widget. Defaults to "en"
languageSelector: true, // Defaults to 'false'
}
const verify = new Verify('application_key', options);
verify.on('completed', ({session_id}) => {
console.log(session_id);
})
verify.on('canceled', ({session_id}) => {})
verify.on('action', ({type}) => {
console.log(type) // -> SMS_SENT;
})
const container = document.getElementById('sdk-container');
verify.mount(token, container);
verify.unmount()