Face Liveness Web SDK

Overview

Face Liveness detection is one of the key requirements today leveraged by Banks, Fintechs and Regulated Entities (REs) to ascertain the identity of an individual. This document gives a way to integrate Bureau's Face Liveness detection as part of the Web Application flow using Bureau's JS SDK for Face Liveness.

This 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

Integration

The following content assumes you're using Bureau's APIv2 version for backend calls.

  • Obtain a clientID Token: In order to start integrating, you'll need a clientID. To obtain the clientID, contact us at [email protected]
  • Import the library: Within the HTML, the library can be included as a regular script tag
<script src="<https://liveness.app.bureau.id/static/js/main.js"></script>

For Staging Environment, modify script as:

<script src="<https://liveness.app.stg.bureau.id/static/js/main.js"></script>
  • An empty HTML element at the bottom of the page can be added for the SDK interface to mount itself on
<div id="bureau-mount"></div>

Initialize the SDK

The SDK can be initialised using the SDK token

window.BureauFacelivenessSDK.init({
  clientId: '<SDK_clientID>',
  containerId: 'bureau-mount',
  redirectURL: ''
});
ParameterFormatNotes
clientIDstringrequired
The Web SDK client ID which will be required to initialize the SDK
containerIdstringrequired
ID of the container element that the UI will mount to. This must be an empty element. The default is bureau-mount.
redirectURLstringrequired
A redirect URL to be passed once the operation is successful.

Typescript support and SDK Size

TypeScript is officially supported, providing typings for:

  • init() method
  • The GZip version of SDK is around 392KB

Browser Compatibility

ChromeFirefoxSafari
Compatible with latest releaseCompatible with latest releaseCompatible with latest release
M-Web, AndroidM-Web, AndroidMacOS

Test

You can check out our Bureau Demo Application for Liveness here: https://liveness.app.bureau.id/

To test this SDK locally make sure the HTML file is hosted on a server.

HTML file must be served on a server for testing. It will not work if you try to open the HTML file directly. Here is a simple guide to serve html files using Node.js