Get Started

The Sybrin Biometrics Web SDK can be used to run liveness detection. Implementing the web SDK is as easy dropping and referencing the relevant files into your project, then simply using the JavaScript API or the web components supplied by the SDK. In this section we will focus on how to get the Sybrin Biometrics Web SDK into your project.

Before you begin

Please ensure that you have acquired an API key and endpoints from Sybrin.

Please ensure that you have the following essential files:

  • Choose between using:

    • Only sybrin.biometrics.all.js, or

    • sybrin.biometrics.js alongside with sybrin.common.js

  • assets/haarcascade_eye.xml

  • assets/haarcascade_frontalface_default.xml

The following are optional files:

  • index.css

  • index.html

  • index.js

If you are using Typescript, you may make use of the typings found under the src folder.

Choosing your library reference approach

When it comes to referencing the main library, the web SDK provides two approaches:

  • Only sybrin.biometrics.all.js, or

  • sybrin.biometrics.js alongside with sybrin.common.js

If your solution only uses the Sybrin Biometrics web SDK with no other Sybrin web SDK's alongside it, it is recommended that you use the singular file containing all required functionality, sybrin.biometrics.all.js.

Alternatively, if your solution uses other Sybrin web SDKs alongside Biometrics, you may use the second approach to trim fat and reduce the overall page size. You are only required to include one instance of sybrin.common.js (either from this SDK or from any other Sybrin SDK that provides the sybrin.common.js file), alongside sybrin.biometrics.js to be able to take full advantage of the Biometrics features that the SDK offers.

Project structure

The Sybrin Biometrics Web SDK is configurable and does not require a specific project structure. You may drop the required files into the root of the project as provided or you can change the folder structure and file locations. This includes the face detection model. Please see configuration options for details on how to configure the path to the face detection model.

Referencing the web SDK

To load the web SDK and its modules, simply add the relevant script tags with references to the JavaScript files of your choosing to the HTML file of your project:

index.html
<script src="sybrin.biometrics.all.js"></script>

Or

index.html
<script src="sybrin.common.js"></script>
<script src="sybrin.biometrics.js"></script>

The above examples assume library files are located at the root of your project. These can be added to the <head> tag or the <body> tag according to preference.

Done

You are now ready and all set up to use the Sybrin Biometrics Web SDK! Check out all the Biometrics Features

Last updated