All pages
Powered by GitBook
1 of 9

Web SDK

In this section, you will find all the necessary information to implement the Web SDK of the Unico IDCloud platform

Installation Guide

In this section, you will find all the information needed to install the Unico IDCloud platform SDK in your Web applications


Compatible Browsers


The capture frame provided through the SDK is compatible with the following combinations of browsers and operating systems:

Operational System
Chrome
Firefox
Safari
Samsung Internet
Opera
Edge

Windows (desktop)

N/A

N/A

Android

N/A

iOS

N/A

MacOS (desktop)

N/A

In general, the SDK supports WebRTC and the more recent versions of the browsers listed above. For compatibility and security reasons, functionality on very old versions of these browsers is not guaranteed.

The capture component provided through the Flutter SDK supports versions equal to or higher for the following technologies:

  • Android: 5.0 (API 21);

  • iOS: 11.

Webview Operation


It is a system component that allows Android or iOS applications to display web content directly within the app, based on the same code project. It is responsible for navigation on websites and web content within the apps.

Preconditions


  • It is necessary to have implemented the Web SDK in an application that contains a secure domain with the https protocol.

Compatibility with Operating Systems


Android:


The Web SDK is compatible with webviews running on Android 8 (API 26) or higher.

For the SDK to work correctly, it is necessary to add some permissions and configurations to the AndroidManifest file, which are as follows:

AndroidManifest.xml
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.webkit.PermissionRequest" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-feature android:name="android.hardware.camera2.full" />
<uses-feature android:name="android.hardware.camera2.autofocus" />

It is recommended to use Chromium-based webviews with some customizations for better JavaScript performance. You can find an implementation example through our PoCs here.

iOS


The Web SDK is compatible with webviews running on iOS 13 or higher.

For the SDK to function correctly, it is necessary to add some permissions and configurations to the info.plist file, which are as follows:

info.plist
<key>NSCameraUsageDescription</key>
<string>Camera usage description</string>

<key>NSLocationWhenInUseUsageDescription</key>
<string>Mensagem da cliente</string>

iOS provides two ways to use webviews in applications: WKWebView and SFSafariViewController. We recommend using SFSafariViewController for better compatibility with DOM resources. You can find an implementation example through our PoCs here.

Compatibility with Hybrid Frameworks


The component has been approved only for native layers. To be used in hybrid frameworks (Flutter or React Native), it is necessary to implement it in the native layer of Android and/or iOS.

When running, the SDK will request permission to open the camera for the webview, which in turn will request the same permission from the native application. It is mandatory that your native application has the necessary permissions set in the configuration files.

Our support is limited to applications developed directly on native Android and iOS platforms, using their respective native modules. Currently, we do not offer support for applications developed in hybrid frameworks such as React Native, Ionic, or other cross-platform development technologies.

Compatibility with social media webviews


The component has been approved on the Instagram and Facebook social media platforms in Liveness mode without interaction. The Liveness mode with interaction is not compatible with webviews in social media apps.

Installing the Web SDK


To implement the Unico IDCloud Android SDK into your Android application, follow the step-by-step guide below:

1

Content Security Policy (CSP) Setting

The Web SDK uses Web Workers to enhance security and performance. Therefore, it is necessary to add the following configurations to your Content Security Policy (CSP):

<meta
  http-equiv="Content-Security-Policy"
  content="
      script-src 'self' 'unsafe-eval' *.googleapis.com *.acesso.io *.unico.run *.unico.io *.unico.app; 
      worker-src 'self' blob:; 
      child-src 'self' blob:;
            style-src 'self' 'unsafe-inline' *.googleapis.com *.acesso.io *.unico.run *.unico.io *.unico.app;
            font-src 'self' https://fonts.gstatic.com *.acesso.io *.unico.run *.unico.io *.unico.app;
            img-src 'self' data: blob: *.acesso.io *.unico.run *.unico.io *.unico.app;
            media-src 'self' data: *.acesso.io *.unico.run *.unico.io *.unico.app;
      script-src-elem 'self' 'unsafe-inline' blob: *.googleapis.com *.acesso.io *.unico.run *.unico.io *.unico.app"
/>

If your application has a CSP, this configuration is mandatory to ensure the correct functioning of the SDK.

2

Obtaining Credentials

  • Contact the CSs and/or Onboarding team.

  • Request the SDK Key by providing the identifiers of your applications. Bundle Identifier for iOS, PackageID for Android, and Host for WEB.

  • The identifiers of your applications will be linked to the SDK Key by the Unico team.

  • You will receive your SDK Key to implement the UnicoConfig.

3

Embedding the Credentials in Your Project

  • Implement the UnicoConfig class in your class:

import { UnicoConfig } from "unico-webframe"

const config = new UnicoConfig()
  .setHostname("<YOUR_HOSTNAME>")
  .setHostKey("<YOUR_HOST_KEY>");

Depracated Method:

import { UnicoConfig } from "unico-webframe"

const config = new UnicoConfig();
  .setProjectNumber("<YOUR_PROJECT_NUMBER>");
  .setProjectId("<YOUR_PROJECT_ID>");
  .setMobileSdkAppId("<YOUR_MOBILE_SDK_APP_ID>");
  .setHostname("<YOUR_HOSTNAME>");
  .setHostInfo("<YOUR_HOST_INFO>");
  .setHostKey("<YOUR_HOST_KEY>");

4

Embedding Other Files in Your Project

The table below lists additional resource files available for inclusion in your project. You should download them and include them in your project to perform Liveness capture:

Release do SDK
Release from FaceTec

3.18.10

9.7.39

3.18.9

9.7.36

3.18.8

9.7.33

3.18.7

9.7.31

3.18.6

9.7.29

3.18.5

9.7.27

3.18.4

9.7.25

3.18.0 -> 3.18.3

9.6.92

3.16.4 -> 3.17.0

9.6.89

3.16.3

9.6.85

3.16.2

9.6.84

3.14.1 -> 3.16.1

9.6.73

3.11.1 -> 3.14.0

9.6.65

3.10.2 -> 3.11.0

9.6.56

3.10.1

9.6.53

3.9.1 -> 3.10.0

9.6.40

3.9.0

9.6.38

3.8.3

9.6.33

3.8.2

9.6.30

3.8.0 -> 3.8.1

9.6.26

3.7.1 -> 3.7.2

9.6.24

3.6.5 -> 3.7.0

9.6.16

3.6.3 -> 3.6.4

9.6.11

3.6.1 -> 3.6.2

9.6.4

3.5.4 -> 3.6.0

9.4.18

3.5.3

9.4.14

3.5.0 -> 3.5.2

9.4.11

5

Download the AI files for the SDK

To download the AI file for the Unico Check SDK Web, click here.

All additional files must be in a public location and visible to the Web within your project.

6

Installation

The Web SDK is provided through an npm package or CDN. To install it, follow the steps below according to your preference:

Installation via NPM package

To install the SDK in your project via npm, simply run the following command:

npm install unico-webframe

Or via yarn, with the command below:

yarn add unico-webframe

Installation via CDN

To install the SDK in your project through the CDN, simply download the file below and import it into your project.

  • Download version 3.20.4.

7

Importing

After installing the SDK, simply import it correctly into your project.

If you installed the package via npm:

import { UnicoCheckBuilder, SelfieCameraTypes, UnicoThemeBuilder, DocumentCameraTypes, UnicoConfig, LocaleTypes } from 'unico-webframe'

If you installed the package via cdn:

import { UnicoCheckBuilder, SelfieCameraTypes, UnicoThemeBuilder, DocumentCameraTypes, UnicoConfig, LocaleTypes } from 'UnicoCheckBuilder.min.js'

Done. Once the SDK installation is complete, proceed to the implementation by reading the following usage and integration guide:

LogoGuia de uso e integração | IDCloud APIs

Still need help?​

Didn't find something or still need help? If you're already a client or partner, you can reach out through our Help Center.

Usage and Integration Guide

In this section, you will find all the necessary information for using and integrating the Unico IDCloud platform SDK into your Webapplications

Selfie Capture

In this section, you will find all the necessary information for using and integrating the Unico IDCloud platform SDK into your Web applications for selfie capture


This guide has been designed to help you quickly and easily implement the Web SDK. Below, you'll find the step-by-step process for the complete integration. If you wish to customize the experience further, check out the Web Customization section.

Initializing the SDK


To get started, follow these 3 simple steps in your project:

Instantiate a new Builder:

const unicoCameraBuilder = new UnicoCheckBuilder();

Specify the path of the additional files (if added to your project):

unicoCameraBuilder.setResourceDirectory("/resources");

Specify the path of the AI model files, if using the Intelligent Camera feature.

unicoCameraBuilder.setModelsPath("https://meusite.com.br/models");

Starting from version 3.18.0, for the SDK to automatically fetch the additional resources, simply do not implement the setResourceDirectory method and ensure that the CSP configurations for using the SDK are applied correctly.

Environment Configuration


If not configured, by default, the Web SDK uses the production environment.

It is possible to configure the environment to be used when running the SDK. Use the enumerated SDKEnvironmentTypes, which contains the following enumerations:

  • SDKEnvironmentTypes.PROD: for the Production environment;

  • SDKEnvironmentTypes.UAT: for the Staging environment.

Here is an example of how to implement it:

import {
  ...
  UnicoCheckBuilder,
  SDKEnvironmentTypes
  ...
} from "unico-webframe"

unicoCameraBuilder.setEnvironment(SDKEnvironmentTypes.UAT);

Implementing the Callback Functions


One of the objects that should be passed as a parameter to the method responsible for rendering the capture frame is the callback object. This object should contain callback functions for success and error cases, as exemplified below.

  const callback = {
    on: {
      success: (obj) => {
        console.log(obj.base64);
        console.log(obj.encrypted);        
      },
      error: (error) => {
        console.error(error)
        //confira na aba "Referências" sobre os erros possíveis
      }
    }
  };

This object is mandatory, and if it is not correctly implemented (covering all success or error events), it will generate an exception, which, if not handled, will be displayed in the user's console.

  • The encrypted attribute is strictly intended for sending the image through the by Client APIs. This attribute should not be opened or serialized, as its characteristics may be altered without prior notice. Its use should be exclusive in interactions with the APIs to ensure the integrity and security of the data. Unico is not responsible for any damage resulting from this practice, as modifications may occur unexpectedly.

  • The base64/encrypted files may vary in size depending on several variables, including the quality of the devices and the photos generated by them, and Unico's business rules. To avoid issues in your application, do not limit the size of the string generated by the SDK for these files in your programming logic or infrastructure.

Configure and Start


To start the camera with the settings made so far, you need to create an instance of the builder using the build() method.

const unicoCamera = unicoCameraBuilder.build();

Then, with the camera "assembled", you need to configure the camera's capture mode.

The camera preparation will be done using the prepareSelfieCamera() method, provided by the builder. This method takes 2 parameters:

  • The UnicoConfig class obtained in this step;

  • The desired camera mode, which can be one of the following:

    • SelfieCameraTypes.NORMAL for the normal camera mode;

    • SelfieCameraTypes.SMART for the smart camera mode.

This method returns a promise, which, when resolved, returns an object used to effectively open the camera via the open method. The open method takes as parameters the callback functions configured in the previous step.

To optimize camera startup, you can separate the calls to the methods prepareSelfieCamera() and open().

If you wish to use automatic capture, pass the parameter Unico.SelfieCameraTypes.SMART to the prepareSelfieCamera method.

For smart capture, the computer vision models should also be loaded through the setModelsPath method, as explained in the first step of this guide.

Using the UnicoConfig class:

const config = new UnicoConfig()
  .setHostname("<YOUR_HOSTNAME>")
  .setHostKey("<YOUR_HOST_KEY>");

  unicoCamera.prepareSelfieCamera(
    config, 
    SelfieCameraTypes.SMART
  ).then(cameraOpener => {
    cameraOpener.open(callback);
  }).catch(error => {
    console.error(error);
    // confira na aba "Referências" sobre os erros possíveis
  });

Configure Capture Mode in iFrames


It is possible to use the Web SDK with embedded Interactive Liveness in an iFrame. To do this, you need to implement a process similar to the previous section when preparing the camera.

The camera preparation will be done through the method prepareSelfieCameraForIFrame(), also provided by the builder. This method takes the same parameters as prepareSelfieCamera():

const unicoCamera = unicoCameraBuilder.build();

const config = new UnicoConfig()
  .setHostname("<YOUR_HOSTNAME>")
  .setHostKey("<YOUR_HOST_KEY>");

  unicoCamera.prepareSelfieCameraForIFrame(
    config, 
    SelfieCameraTypes.SMART
  ).then(cameraOpener => {
    cameraOpener.open(callback);
  }).catch(error => {
    console.error(error);
    // confira na aba "Referências" sobre os erros possíveis
  });

TThe method prepareSelfieCameraForIFrame() only works if the implementation is inside an iFrame. Using it outside of an iFrame will result in error 73724. Similarly, using the method prepareSelfieCamera() inside an iFrame will also result in error 73724.

Implementing the iFrame Element


For the capture to work correctly, it is necessary to implement the <iframe> element as shown in the example below:

<iframe allow="fullscreen;camera;geolocation" allowFullScreen src="your_app_url"></iframe>

Fullscreen Behavior

To perform the capture, it is required to be in full-screen mode in the browser so that the SDK can resize automatically. Therefore, when performing the capture, the SDK will display a screen requesting that the frame be opened in full-screen mode. See the following example:

After allowing fullscreen usage, the capture frame will open normally:

Apple restricts the use of full-screen APIs specifically on iPhones (iPads are acceptable). Therefore, for captures on iPhones, it is necessary to manually configure the positioning of the iFrame.

Making a POST Request to the Client API


Capturing the images is only the first part of the journey. After capturing the image, it is necessary to send the encrypted data generated by the SDK to the by Client REST APIs. For more information, refer to the CreateProcess section of by Client.

For security reasons, the interval between generating the encrypted data and sending it via one of the available flows should be no more than 10 minutes. Submissions made beyond this period will be automatically rejected by the API.


Still need help?​

Didn't find something or still need help? If you're already a client or partner, you can reach out through our Help Center.

Document Capture

In this section, you will find all the necessary information for using and integrating the Unico IDCloud SDK into your Web applications for document capture


This guide has been designed to help you implement the Web SDK quickly and easily. Below, you will find a step-by-step process for the entire integration. After that, if you wish to customize the experience, be sure to check the Web Customization section.

Available Document Frames


In this camera mode, there is a capture frame to assist the user in positioning the document correctly. Once the document is positioned properly, the user must click the button to capture the document photo.

The SDK does not perform any kind of validation on what is being captured.

In this camera mode, it is possible to capture the following documents:

  • CPF: Capture the front of the CPF;

  • CNH: Capture the open CNH;

  • CNH Front: Capture the front of the CNH;

  • CNH Back: Capture the back of the CNH;

  • RG Front: Capture the front of the RG;

  • RG Back: Capture the back of the RG;

  • Others: Capture any other document.

Initializing the SDK


To get started, you need to perform 2 simple steps in your project:

Instantiate a new Builder:

const unicoCameraBuilder = new UnicoCheckBuilder();

Specify the path for additional files (if added to your project):

unicoCameraBuilder.setResourceDirectory("/resources");

Configure Frame Size


It is recommended that you configure the size of the frame within your application to optimize the capture area within your WebApp. Below is how to make this configuration for Web Desktop or Mobile.

Often, the frame's functionality can be affected by design systems that have some type of grid system, such as Bootstrap or Material-UI. To minimize this risk, ensure that you position the frame (id="box-camera") in a place in the code where it does not inherit any unwanted CSS rules.

In the Web Desktop versions, it is possible to restrict the size of the frame so that it doesn't use the entire dimension of your WebApp. To do this, simply wrap the frame (id="box-camera") in another HTML tag, as shown in the example below:

<div class="container">
  <div id="box-camera"></div>
</div>

Ideally, you should aim to maintain a proper ratio between height and width, as this will make it easier to frame the user's face. Here's an example:

.container {
  width: 800px;
  height: 600px;
  position: relative;
}

Following the example above, the frame respects the size of the "parent" element, in this case represented by the container. This way, you have the flexibility to implement the frame in the most convenient way for your application (e.g., inside a modal).

Tests involving resizing the screen through your browser's developer mode will not work as expected. It is recommended to perform this type of test by resizing your browser window instead.

For a Web Mobile view, it is recommended that the capture frame occupy 100% of the screen to avoid issues with computer vision algorithms. If the capture area is distorted, the automatic capture feature (Smart Camera) may face issues in tracking the user's face.

Therefore, for the Web Mobile view:

  • The capture frame should occupy 100% of the device screen (100vw/vh);

  • Avoid horizontal or vertical scrolling (this can be minimized by using a modal).

You can check an example of implementation through a project on this page (Angular).

Testing devices using the developer mode in your browser won't work, as the camera used by your browser is the same as on your desktop, which has a resolution vastly different from a mobile device camera. We recommend that such tests be done directly on the device.

Implementing the Callback functions


One of the objects that must be passed as a parameter to the method responsible for rendering the capture frame is the callback object. This object should contain callback functions for success and error cases, as exemplified below:

  const callback = {
    on: {
      success: (obj) => {
        console.log(obj.base64);
        console.log(obj.encrypted);
      },
      error: (error) => {
        console.error(error)
      },
    }
  };

This object is mandatory, and if not properly implemented (covering all success or error events), it raises an exception, which, if not handled, is displayed in the user's console.

Configure and Start Camera


To start the camera with the settings made so far, it is necessary to create an instance of the builder through the build() method.

const unicoCamera = unicoCameraBuilder.build();

Then, with the camera "assembled," the capture mode of the camera must be configured.

The camera preparation is carried out using the prepareDocumentCamera() method, available from the builder. This method takes two parameters:

  • The UnicoConfig class obtained in this step;

  • The type of document to be captured, which are:

Parameter
Description

DocumentCameraTypes.CPF

Capture the front of the CPF

DocumentCameraTypes.CNH

Capture the open CNH

DocumentCameraTypes.CNH_FRENTE

Capture the front of the CNH

DocumentCameraTypes.CNH_VERSO

Capture the back of the CNH

DocumentCameraTypes.RG_FRENTE

Capture the front of the RG

DocumentCameraTypes.RG_VERSO

Capture the back of the RG

DocumentCameraTypes.RG_FRENTE_NOVO

Capture the front of the new RG

DocumentCameraTypes.RG_VERSO_NOVO

Capture the back of the new RG

DocumentCameraTypes.OTHERS("descrição")

Capture any other document

This method returns a promise that, when resolved, returns an object that is used to actually open the camera through the open method, which takes as a parameter the callback functions configured in the previous step.

Below is an example using the CNH capture:

Using the UnicoConfig class:

  const config = new UnicoConfig()
    .setProjectNumber("<YOUR_PROJECT_NUMBER>")
    .setProjectId("<YOUR_PROJECT_ID>")
    .setMobileSdkAppId("<YOUR_MOBILE_SDK_APP_ID>")
    .setHostname("<YOUR_HOSTNAME>")
    .setHostInfo("<YOUR_HOST_INFO>")
    .setHostKey("<YOUR_HOST_KEY>");

  unicoCamera.prepareDocumentCamera(
    config, 
    DocumentCameraTypes.CNH
  ).then(cameraOpener => {
    cameraOpener.open(callback);
  }).catch(error => {
    console.error(error);
    // confira na aba "Referências" sobre os erros possíveis
  });

If you need to capture a document for which there is no specific frame (e.g., RNE, among others), use the If you need to capture a document that does not have a specific frame (e.g., RNE, among others), use the frame DocumentCameraType.None, which will provide you with a generic, rectangular frame that can be used to guide any capture.

Making a POST Request to the Client API


Capturing the images is just the first part of the journey. After capturing the image, it is necessary to send the base64 generated by the SDK to the REST APIs of by Client. Learn more in the CreateProcess section of by Client.


Still need help?​

Didn't find something or still need help? If you're already a client or partner, you can reach out through our Help Center.

Accessibility

In this section, you will find tips and information about accessibility.

SDK Components


The SDK implements components prepared with HTML attributes for accessibility, such as aria-label, tabindex, role, among others, which enable keyboard navigation between elements, activate audio guidance, and are used by screen reader software.

Best Practices


When integrating the Web SDK into a page, there may be other interactive elements on the page that are not visible during the camera opening and image capture flow. These elements may end up causing conflicts with the information in the capture flow, disrupting the user experience. Therefore, it is important to remove or deactivate interaction with other elements while the capture is being performed.

This can be done in several ways, depending on the existing elements and frameworks used on the page. Below is an example using the aria-hidden attribute:

// page html
// <div id="main-content">
//  <header>...</header>
//  <button id="my-button">Interactive Button</click>
//  <footer>...</footer>
// </div>


const unicoSdk = new UnicoCheckBuilder().build();

unicoSdk
  .prepareSelfieCamera(...)
  .then((cameraOpener) => {
    const pageElement = document.getElementById('main-content');
    pageElement.setAttribute('aria-hidden', true);
    
    cameraOpener.open({
      on: {
        success: (obj) => {
          pageElement.setAttribute('aria-hidden', false);
        },
        error: (error) => {
          pageElement.setAttribute('aria-hidden', false);
        },
      },
    });
  });

aria-hidden

It is important to use this attribute with caution, as it can harm the accessibility of elements on the page if applied incorrectly or not removed when the capture flow ends.

References

  • https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-hidden.


Still need help?​

Didn't find something or still need help? If you're already a client or partner, you can reach out through our Help Center.

Error Handling Guide

In this section, you will find all the necessary information for handling errors from the Unico IDCloud SDK in your Web applications


ErrorBio​ Object


This object is returned whenever an error occurs in the Web SDK.

Available Methods


Method Name
Description

getCode()

Method used to obtain the error code that occurred.

getDescription()

Method used to obtain the description of the error that occurred.


Below is a list of possible error codes from the Web SDK, in the prepareCamera method:

73000

Unknown and unexpected error. Unico SDK leverages a variety of APIs including camera, storage, security, networking, and more. This return value is a catch-all for errors experienced during normal usage of these APIs.

73001

<property> is required

73002

<property> must be an instance of <class>

73003

<class> with name <name> is not available to inject.

73004

Class type must be a function or a class.

73005

Could not find the <locale> locale.

73006

Could not find text: <text>.

73100

Unable to connect to internet.

73200

Could not find the Unico SDK JSON file.

73201

Could not load the Unico SDK JSON file.

73202

Unico SDK JSON file is invalid.

73204

Unable to initialize the SDK, please configure the environment on setEnviroment method of build.

73300

Could not authenticate this application.

73301

Could not authenticate this application.

73302

Authentication token not found.

73303

Current host is not registered.

73400

Could not initialize camera.

73401

Could not load ML models for this camera.

73402

The Key could not be verified due to connectivity issues on the user's device.

73403

This device/platform/browser/version combination is not supported by SDK.

73404

Device is in landscape display orientation. The SDK can only be used in portrait display orientation.

73405

Device blocked due to multiple failed attempts.

73406

The Session was cancelled, the SDK was opened in an IFrame.

73407

The SDK was not fully loaded.

73500

Could not get session.

73501

Could not get session.

73502

Session token not found.

73600

Could not find camera resource.

73601

Could not start camera in production mode.

74000

Invalid hexadecimal.

74001

Object is not a UnicoTheme

Below is a list of possible error codes from the Web SDK, in the openCamera method:​


Code
Description

73700

Could not parse camera response.

73704

The user pressed the cancel button and did not complete the session.

73706

The camera access is prevented because either the user has explicitly denied permission or the user's device is configured to not allow access by a device policy.

73707

The session was canceled due to the app being terminated, put to sleep, an OS notification, or the app was placed in the background.

73708

The session was cancelled because device is in landscape mode. The user experience of devices in these orientations is poor and thus portrait is required.

73710

The session was cancelled because the user was unable to complete a Session in the default allotted time or the timeout set by the developer.

73715

The session was cancelled because not all guidance images were configured.

73716

The session was cancelled because SDK was unable to start the camera on this device.

73717

The session was cancelled because the user was in a locked out state.

73718

The session was cancelled because of an unknown and unexpected error. SDK leverages a variety of iOS APIs including camera, storage, security, networking, and more. This return value is a catch-all for errors experienced during normal usage of these APIs.

73720

The developer programmatically called the session cancel API.

73721

The session was cancelled due to a device orientation change during the session.

73722

The session was cancelled because the document is not ready.

73723

The session was cancelled because there was another session in progress.

73724

The session was cancelled because the camera was opened in an iFrame.

73728

Connection error, please use HTTPS to connect.

73729

Browser not supported, please open in another browser.

73730

Unable to initialize an active liveness session because of an unknown and unexpected license error.

73731

Unable to initialize an active liveness session because the license has expired.

73732

Unable to initialize an active liveness session because Origin is not permitted.

73800

Could not encrypt response.

73900

Could not get system information.


Still need help?​

Didn't find something or still need help? If you're already a client or partner, you can reach out through our Help Center.

Web Customization

In this section, you will find all the information necessary for customizing the SDK of the Unico IDCloud platform in your Web applications


The Web SDK allows for some customizations to be made. Below are all the possible customizations for this SDK.

Customize Language


It is possible to configure the experience of the informational messages in the capture frames by changing their language. Use the enumerated type LocaleTypes, which contains the following values:

  • LocaleTypes.PT_BR: for Portuguese(Brazil);

  • LocaleTypes.ES_MX: for Spanish(Mexico);

  • LocaleTypes.ES_ES: for Spanish(Spain);

  • LocaleTypes.EN_US: for English(USA).

See how to implement it in the example below:

import {
  ...
  UnicoCheckBuilder,
  LocaleTypes
  ...
} from "unico-webframe"

unicoCameraBuilder.setLocale(LocaleTypes.EN_US);
  • A remote activation may be required to be used, if you wish to use it, notify your project manager or Unico support.

  • If not configured, the SDK will use Portuguese as the default language.

Customize Capture Experience


This is an optional step, but highly recommended to ensure the capture process aligns with your company's visual identity.

To customize the capture frame using the Theme Builder, simply create an instance of the UnicoThemeBuilder class and invoke the methods that customize each of the properties of the capture frame, as demonstrated in the example below:

const unicoTheme = new UnicoThemeBuilder()
.setColorSilhouetteSuccess("#0384fc")
.setColorSilhouetteError("#D50000")
.setColorSilhouetteNeutral("#fcfcfc")
.setBackgroundColor("#dff1f5")
.setColorText("#0384fc")
.setBackgroundColorComponents("#0384fc")
.setColorTextComponents("#dff1f5")
.setBackgroundColorButtons("#0384fc")
.setColorTextButtons("#dff1f5")
.setBackgroundColorBoxMessage("#fff")
.setColorTextBoxMessage("#000")
.setColorCancelButton("#0384fc")
.setColorProgressBar("#0384fc")
.setHtmlPopupLoading(`<div style="position: absolute; top: 45%; right: 50%; transform:
translate(50%, -50%); z-index: 10; text-align: center;">Carregando...</div>`)
.build();

After generating the theme object, as demonstrated above, it must be passed as a parameter to the setTheme method of the unicoCameraBuilder.

unicoCameraBuilder.setTheme(unicoTheme);

Still need help?​

Didn't find something or still need help? If you're already a client or partner, you can reach out through our Help Center.

Release notes

In this section, you will find all the updates for the Unico IDCloud Web SDK


Keep your Android SDK always up to date with the latest available version. Semantic versioning is used to number the versions. For more information, please refer to the article Overview.


Versão 3.20.5 - 09/06/2025

  • Updating the Liveness SDK and server with interaction;


Version 3.20.4 - 04/06/2025

Critical Update

  • Improvements in liveness flow with interaction against recurring market attacks.

  • Internal product improvements. These improvements do not directly affect the end user experience, leaving the interface and external functionalities unchanged.


Version 3.20.3 - 26/05/2025

  • Updating the Liveness SDK and server with interaction;


Version 3.20.2 - 17/05/2025

  • Updating the Liveness SDK and server with interaction;


Version 3.20.1 - 07/05/2025

  • Updating the Liveness SDK and server with interaction;

  • Accessibility improvements to the Liveness flow with interaction.


Version 3.20.0 - 31/03/2025

  • Update of the Liveness SDK and server with interaction;

  • Fix for handling issues when using LocalStorage.


Version 3.19.3 - 10/03/2025

  • Updated Liveness SDK and Interactive Server.


Version 3.19.2​ - 29/01/2025

  • New method to customize fonts in the class UnicoThemeBuilder;

  • Internal product improvements. These improvements do not directly affect the end-user experience, keeping the interface and external functionality unchanged.


Version 3.19.1​ - 20/01/2025

  • Internal product improvements. These improvements do not directly affect the end-user experience, keeping the interface and external functionality unchanged.


Version 3.19.0​ - 17/01/2025

  • Updated Liveness SDK and Interactive Server;

  • Add frame OTHERS_V2;

  • Internal product improvements. These improvements do not directly affect the end-user experience, keeping the interface and external functionality unchanged.


Version 3.18.11​ - 18/12/2024

  • Updated Liveness SDK and Interactive Server;

  • Internal product improvements. These improvements do not directly affect the end-user experience, keeping the interface and external functionality unchanged.


Version 3.18.10​ - 10/12/2024

  • Updated Liveness SDK and Interactive Server;

  • Accessibility improvements to the Liveness stream with interaction.


Version 3.18.9​ - 18/11/2024

  • Updated Liveness SDK and Interactive Server.


Version 3.18.8​ - 24/10/2024

  • Updated Liveness SDK and Interactive Server;

  • Resolution of conflicts between observability tools.


Versão 3.18.7​ - 15/10/2024

  • SDK Update and Liveness Server Interaction.


Still need help?​

Didn't find something or still need help? If you're already a client or partner, you can reach out through our Help Center.