<script src='https://cdn.veriff.me/sdk/js/1.5/veriff.min.js'>

  // CommonJS
  const Veriff = require('@veriff/js-sdk');

  const veriff = Veriff({
    apiKey: 'API_KEY',
    parentId: 'veriff-root',
    onSession: function(err, response) {
      // received the response, verification can be started / triggered now

      // redirect
      window.location.href = response.verification.url;

      // incontext sdk
      createVeriffFrame({url: response.verification.url});
    }
  });

  veriff.mount();

</script>

<div id='veriff-root'></div>