Skip to the content.

Iframe SDK Documentation

Ubble now supports an integration via iframe.

How to use

Include the SDK as a script tag

<script src="https://oos.eu-west-2.outscale.com/public-ubble-ai/iframe-sdk-0.0.1.js" type="application/javascript"></script>

We expect your page to implement a global method onUbbleReady that will be triggered when the SDK is loaded

function onUbbleReady() {

}

Initialise a new Ubble IDV object:

function onUbbleReady() {
  const ubbleIDV = new Ubble.IDV(elementId, options);
}

API

new Ubble.IDV(elementId, options)

elementId: A string or DOM element

<div id="ubble"></div>
new Ubble.IDV('ubble', options);
new Ubble.IDV(document.getElementById('ubble'), options);

options: object

Methods:

Full Example

const ubbleIDV = new Ubble.IDV("idv", {
    width: "500",
    height: "600",
    allowCamera: true,
    identificationUrl: "https://id.ubble.ai/11111111-1111-1111-1111-111111111111",
    events: {
      onComplete(event) {
        ubbleIDV.destroy();
      },
      onAbort(event) {
        ubbleIDV.destroy();
      }
    }
  });