Example

To install the Face Index SDK in your project, copy and paste the code below into the page where you want to use the SDK.

<div id="legitimuz-root"></div>
<script src="https://cdn.legitimuz.com/js/sdk/faceindex.js"></script>
<script lang="text/javascript">
  const sdkInstance = LegitimuzFaceIndex({
    apiURL: "https://api.legitimuz.com",
    appURL: "https://liveness.legitimuz.com",
    token: "your-integration-token",
  });

  // Mount SDK
  sdkInstance.mount();
</script>

Usage

Before implementing the following code, it is important to ensure that the page contains the necessary HTML elements. The Face Index SDK requires an input element with the id attribute set to legitimuz-hydrate-cpf. This element is used for CPF input.

<input id="legitimuz-hydrate-cpf" type="tel" max-length="11" />

```html
<input id="legitimuz-hydrate-cpf" type="tel" max-length="11" />

Additionally, the page must include a button element with the id attribute set to legitimuz-action-faceindex. This button is essential to start the verification process.

Ensure that these elements are present on the page before proceeding with the implementation of the above code.

Does your code have a different writing pattern? Don’t worry, you can change the element selector through the methods exported by the SDK.