Web - Liveness SDK
September 30th, 2022
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
- Obtain an Authkey Token :
In order to start integrating, you'll need an Authkey token. To obtain the authKey, contact us at [email protected] - Import the library
- Include HTML tag script
CDN Script Link
<script src="https://dev.d22ak66d50a6sa.amplifyapp.com/static/js/main.js"></script>
- Include HTML tag script
- 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")
}
});
Parameter | Format | Notes |
---|---|---|
authkey | string | required Your Web SDK authkey |
containerId | string | required 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
Methods | Format | Notes |
---|---|---|
onSuccess | function | Success call back when the SDK returns success response |
onFailure | function | Failure callback when the SDK returns failure response |
TypeScript
TypeScript is officially supported, providing typings for:
init()
methodoptions
argument (SdkOptions
)
Addiotional Information
Browser compatibility
Browser | Version |
---|---|
Safari | Latest |
Edge | Latest |
FIrefox | 11+ |
Chrome | Latest |