Web - Liveness SDK

Overview

The Bureau's Faceliveness Web SDK provides a set of components for JavaScript applications to capture selfie photos for the purpose of identity verification.

The SDK offers a number of benefits to help you create the best identity verification experience for your customers:

  • Carefully designed UI to guide your customers through the entire photo capture process.
  • Modular design to help you seamlessly integrate the photo process into your application flow.

Note

The project should be compatible with Reactjs & Javascript to use the SDK. You can create an empty Reactjs project or use any online IDEs i.e Codesandbox or Repl.

Getting started

  1. Obtain an Authkey Token :
    In order to start integrating, you'll need an Authkey token. To obtain the authKey, contact us at [email protected]
  2. Import the library
    1. Include HTML tag script
      CDN Script Link
      <script src="https://dev.d22ak66d50a6sa.amplifyapp.com/static/js/main.js"></script>
      
  3. Add basic HTML markup
    Add an empty HTML element at the bottom of your page for the SDK interface to mount itself on.
 <div id="bureau-mount"></div>

Initialize the SDK

You can now initialize the SDK, using the SDK token.

window.BureauFacelivenessSDK.init({
  authKey: '<YOUR_SDK_Authkey>',
  containerId: 'bureau-mount',
  onSuccess: function(){
    console.log("Liveness Check Successful")
  },
  onFailure: function(){
    console.log("Something went wrong, Please try again")
  }
});
ParameterFormatNotes
authkeystringrequired
Your Web SDK authkey
containerIdstringrequired
A string containing the ID of the container element that the UI will mount to. This must be an empty element. The default is bureau-mount.

Callbacks

MethodsFormatNotes
onSuccessfunctionSuccess call back when the SDK returns success response
onFailurefunctionFailure callback when the SDK returns failure response

TypeScript

TypeScript is officially supported, providing typings for:

  • init() method
  • options argument (SdkOptions)

Addiotional Information

Browser compatibility

BrowserVersion
SafariLatest
EdgeLatest
FIrefox11+
ChromeLatest