Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
In this section, you will find everything related the REST APIs for using the by Unico integration method
In this section, you will find all available REST APIs for using the by Unico integration method
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
In this section, you will find additional resources related to the by Unico integration method
Loading...
In this section, you will find the experience components that can be used with by Unico
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
In this section, you will find everything related the REST APIs for using the by Client integration method
In this section, you will find all the available REST APIs for using the by Client integration method
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
In this section, you will find additional resources related to the by Client integration method
Loading...
Loading...
Loading...
Loading...
In this section, you will find all the technical specifications of the available SDKs from the Unico IDCloud platform
Loading...
Loading...
In this section, you will find all the necessary information to implement the SDKs of the Unico IDCloud platform
In this section, you will find all the necessary information to implement the Android SDK of the Unico IDCloud platform
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
In this section, you will find all the necessary information to implement the Unico IDCloud platform's iOS SDK
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Nesta seção, você encontrará todas as informações necessárias pra implementar o SDK Flutter da plataforma Unico IDCloud
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
In this section, you will find all the necessary information to implement the Web SDK of the Unico IDCloud platform
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
In this section, you will find additional resources related to the SDK
Loading...
Loading...
Loading...
In this section, you will learn more about the integration methods of the Unico IDCloud platform
For companies looking to partner with an expert to manage user experience with best practices and privacy, as well as ease in orchestrating flows with Unico's capabilities and automatic updates of technologies, such as SDKs.
With by Unico, you will have a team of security specialists and UX design best practices to ensure the best possible conversion in your operation. It can be used responsively on both Desktop and Mobile, offering the following usage options:
Desktop
Webmobile
App mobile
For the messaging flow, it is possible to send notifications through the channels of: WhatsApp, SMS, and Email.
Check out the end-user experience with by Unico in Messaging, Webview, and iFrame, respectively, in the tabs below:
For companies that want to control the user experience with their own frontend, as well as build flows with Unico's capabilities on the backend alongside other technologies and resources used for authentication,
with by Client, you have the freedom you need to create and manage the end-user journey as you see fit, leveraging the capabilities of the Unico IDCloud platform as needed.
Check out the experience of capturing the end user's selfie with by Client using Unico's SDKs:
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.
Here you will find the technical information for the Unico IDCloud platform's REST APIs
Welcome to the Unico IDCloud platform REST API documentation! On this page, you'll find everything you need to know to enhance the security and quality of your applications using our REST API.
Didn't find something or still need help? If you're already a client or partner, you can reach out through our .
In this section, you will find an overview of how to integrate with the Unico IDCloud platform
To optimize your integration, you can use the Webhook to know when the result of your process is complete.
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 .
🔒 About APIs
See the technical specifications for the IDCloud platform APIs.
In this section, you will find the full technical specifications for the authentication method required to use the IDCloud platform’s REST APIs
To use the IDCloud platform, you must authenticate via access token using the OAuth2 authentication system. Unico’s OAuth2 authentication supports server-to-server interaction between a web application and Unico's services.
In this setup, you will need a service account, an impersonal account that belongs to your application rather than to an individual user. Your application calls Unico’s APIs on behalf of the service account, so no users are directly involved. This setup is called “two-legged OAuth,” or “2LO.” Typically, an application uses a service account when it calls Unico’s APIs to work with its own data rather than user data.
This is the first essential step in your implementation, so be sure not to skip it.
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.
In this section, you will find an example of implementing authentication for the Unico IDCloud platform in JavaScript
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.
In this section, you will find all technical specifications for the Unico IDCloud platform's REST APIs, using the by Unico integration method.
Learn all about our Unico IDCloud identity verification platform
IDCloud is the only identity verification platform that combines security with guaranteed accuracy. It enables user identity validation through a simple and intuitive process using just a selfie, ensuring smooth and secure verification flows.
The platform is versatile and adaptable to various use cases, allowing customization based on your specific requirements. We offer a range of capabilities — features of our platform designed to support a wide variety of operations and needs. IDCloud can be integrated through two modes: and by Client.
For more information on our capabilities, visit the following page:
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.
In this section, you will find which capabilities are available for each integration method of the Unico IDCloud platform
To meet the diverse use cases of your operation, the capabilities of IDCloud have different availabilities based on the integration methods. Below, check the table with all the usage possibilities, categorized by integration method:
Identity Verification
Risk Score
Behavior Alert
Liveness
Validation (1:1)
Document Capture and Reuse
Electronic Signature
In each integration method, it is possible to combine various capabilities with one another. To learn more about the possible flows for each integration method, refer to the "Overview" menus in their respective sections under "Integration."
For both integration methods, it is also possible to obtain the SERPRO similarity return.
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.
In this section, you will find additional resources related to authentication
In this section, you’ll find instructions on how to complete the authentication process on the Unico IDCloud platform
After creating and configuring a service account, your application needs to complete the following steps:
Create a JSON Web Token (JWT), which includes the header, payload, and signature.
Request an Access Token from the OAuth2 authentication platform.
Process the JSON response returned by the authentication platform.
If the response includes an access token, you can use it to make requests to Unico product APIs for which the service account has access permissions. (If the response does not include an access token, your JWT or token request may be incorrect, or the service account might lack the necessary permissions to access the requested resources.)
The access token generated in the above request has a default validity of 3600 seconds, but this may vary based on the security configuration set for your company. When the access token expires, your application must generate a new JWT, sign it, and request a new access token from the authentication platform.
A JWT (JSON Web Token) consists of three parts: a header, a payload, and a signature. The header and payload are JSON objects, which are serialized in UTF-8 and then encoded using Base64url encoding. This encoding ensures resilience against modifications due to repeated encoding operations. The header, payload, and signature are concatenated using a period (.
) separator.
A JWT is structured as follows:
The base text for the signature is formed in the following way:
The header consists of two fields that specify the signing algorithm and the token format. Both fields are mandatory, and each field has only one value. Service accounts rely on the RSA SHA-256 algorithm and the JWT token format.
As a result, the JSON representation of the header is as follows:
The Base64url representation is as follows:
This ensures that both header and payload are properly encoded before signing, which is crucial for secure authentication.
The JWT payload contains information about the JWT, including the requested permissions (scopes), the account requesting access, the issuer, the time the token was issued, and the token's lifespan. Most fields are mandatory. Like the JWT header, the payload is a JSON object and is used in the composition of the signature.
The required fields in the JWT are shown in the table below. They can appear in any order within the payload.
iss
The identifier of the service account within the company.
scope
A space-delimited list or a list separated by the plus sign (+) of the permissions that the application is requesting. If all permissions of the account are required, use the asterisk sign (*) for that purpose.
aud
exp
The expiration time of the token, specified in seconds since 00:00:00 UTC, January 1, 1970. This value has a maximum time of 1 hour after the moment of issuing the JWT. This value must be numeric. Common cases that DO NOT work:
Using quotes to delimit the value. For example: “1524161193” is a string and will not work. However, 1524161193 is a number and will work.
iat
The moment of issuing the JWT, specified in seconds since 00:00:00 UTC, January 1, 1970. This value must be numeric.
Using quotes to delimit the value. For example: “1524161193” is a string and will not work. However, 1524161193 is a number and will work.
Understand how the conversion works for the issuance (iat) and expiration (exp) fields of the JWT, and also see examples of how to use the values of these fields here. Additionally, the "iat" field should reflect the current time in the required format, and the "exp" field must adhere to the calculation below:
The representation of the mandatory JSON fields in the JWT payload is as follows:
The JSON Web Signature (JWS) specification is the mechanism that guides the calculation of the signature for a JWT. The input content for the signature calculation is the byte array of the following content:
The same algorithm specified in the header of the JWT must be used for the signature calculation. The only signature algorithm supported by the OAuth2 authentication platform is RSA using SHA-256. It is expressed as RS256 in the alg field of the JWT header.
Sign the UTF-8 representation of the input content using SHA256withRSA (also known as RSASSA-PKCS1-V1_5-SIGN with SHA-256 hash) with the private key that was created and associated with the service account (the .key.pem file generated from the request received by email). The output content will be a byte array.
The signature must then be encoded in Base64url. The header, payload, and signature must be concatenated with a period (.). The result is the JWT. It should be in the following format: {Header in Base64url}.{Payload in Base64url}.{Signature in Base64url} Below is an example of a JWT token before Base64url encoding:
Below is an example of a JWT token before Base64url encoding:
Below is an example of the JWT that has been signed and is ready for transmission:
It is also possible to use pre-established libraries to create the JWT. As a reference, you can find a list of libraries on the jwt.io website.
After generating the signed JWT, an application can use it to request an access token. The access token request is a POST HTTPS request, and the body must be URL encoded. The URL is as follows:
The parameters below are mandatory in the request:
grant_type
Use the following text, URL-encoded if necessary: urn:ietf:params:oauth:grant-type:jwt-bearer.
assertion
The JWT, including the signature.
If the JWT and the access token request were properly formed and the service account has the necessary permissions, then the response from the authentication platform returns a JSON object containing an access token. Here’s an example of a response from the platform:
The access token returned in the “access_token” field of the JSON object is also a JWT that should be used for the APIs of Unico’s products. If an error occurs in the request, you can check the type of error in the error table by clicking here.
The duration of the access token is variable. Its duration is specified in the "expires_in" field, returned along with the access token. The same access token should be used during its validity for all calls to the product APIs.
Do not request a new access token until the validity of the current token is nearing its end. We recommend a margin of 600 seconds (10 minutes). To do this, perform the calculation:
Where token.exp is the timestamp of the token's expiration.
By default, the token sent to the company is valid for 1 hour, but this can be changed. It is recommended to always use the expires_in
as a reference and subtract 600 seconds from it to request a new token.
Examples:
A new access token can be requested when there are 10 minutes left until expiration.
Do not use a fixed time to obtain a new token, as the duration of the received token may be shorter than the established time, which will result in service usage failures.
¹ According to RFC 4648 for BaseN encoding, the Base64url format is similar to the Base64 format, except that the character = should be omitted, and the characters + and / should be replaced with - and _, respectively.
² JSON Web Signature: https://tools.ietf.org/html/rfc7515.
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.
In this section, you will find instructions on how to create a service account to authenticate with the Unico IDCloud platform.
To use server-to-server interactions, you need to request the creation of a service account through the project manager responsible for your company by providing the following information: company name, application name, name, email, and phone number of the person responsible for the application within the company. Separate accounts are required for the Homologation and Production environments.
Once this information is received, a service account responsible for authenticating your application will be created, and an email will be sent to generate the key pair for the account.
A service account credential includes a unique account name, a company identifier (Tenant ID), and at least one key pair (public and private). After generating the keys, you will only receive the private key (a .key.pem file) along with the payload that must be used to construct the JWT. This payload will follow the format below:
If you need the public key for system configuration, please contact the project manager responsible for your account. Alternatively, you can generate a public key using the following OpenSSL command:
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.
In this section you will find all the technical specifications of the by Unico REST APIs
The by Unico channel provides an infrastructure for identity validation solutions from the IDCloud platform.
It aims to simplify the use of IDCloud's capabilities by offering a solution that can be integrated into your back end and front end, enhancing transaction security.
Compatible with all devices with a front camera, whether laptops or mobile, respecting the list of officially supported browsers below:
Other browsers are not supported.
The by Unico integration for Unico IDCloud allows clients to integrate more easily and connect different capabilities within a single journey. This integration provides the necessary resources for functions such as Liveness, Identity Verification, Risk Scoring, Document Capture and Reuse, and Electronic Signature.
To utilize these functions, simply adjust the flow
parameter in the REST API payload, which unlocks various verification journey options.
If you use the Document Reuse and Capture capability, consider:
Reuse: Brazilian ID (RG), Brazilian Driver's License, CIN and Brazilian Passport;
Capture: Brazilian ID (RG), Brazilian Driver's License, CIN and Brazilian Passport;
In this step, determine where your user's journey will take place.
Will the journey be web-based? You can use the browser Redirect or iFrame.
Will the journey be in your app? You can use a Webview.
Will the journey be in a messaging flow? You can send notifications via WhatsApp, SMS, and Email (simply provide the corresponding parameter in the CreateProcess request in step 2).
To optimize your integration, you can use a Webhook to be notified when your process result is complete.
In this section, you will find how to create a process in Unico via the REST API
In this section, you will find detailed documentation on how the Process Creation endpoint works in by Unico. Note that to utilize the capabilities of the IDCloud platform in this integration method, you only need to change the value of the "flow" parameter when creating the process. Unico will handle the orchestration of all the desired capabilities.
Learn more about using capabilities in by Unico in the Overview section.
Your API requests are authenticated using an access token. Any request that does not include a valid access token will return an error.
You can learn more about generating an access token here.
Endpoints:
UAT: ;
Produção: .
Processes must be created exclusively through backend-to-backend communication, due to our CORS policy, which prevents processes from being created through frontend-to-backend communication.
Tips:
For more information about the scenarios you may receive in the response, refer to the Response Scenarios section.
In this section, you will find the Postman collection for the REST API to authenticate on the Unico IDCloud platform
Download the file below, import it into Postman, and replace the values of the parameters "service_account," "tenant_id," and "secret_key" to test the request.
Address of the authentication platform that issues access tokens. This value must always and exactly be Common cases that DO NOT work:
Inserting a trailing slash at the end of the address:
Using the HTTP protocol instead of HTTPS:
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 .
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 .
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 .
Compatible with all devices with front camera, Android 8+, armv7 or arm64.
Compatible with all iOS devices version 11 or higher.
iOS:
version greater than or equal to 12.
Android:
version greater than or equal to 5.
Android:
Chrome: version greater than or equal to 90.
iOS:
Safari: version greater than or equal to 14.1;
Chrome: version greater than or equal to 90 (only for IOS version equal to or greater than 14.4).
Chrome:
version greater than or equal to 85.
Firefox:
version greater than or equal to 94.
Safari:
version greater than or equal to 11.
idlive
Liveness
id
Liveness + Identity Verification
idlivetrust
Liveness + Behavior Alert
idtrust
Liveness + Identity Verification + Behavior Alert
idtrustdocssign
Liveness + Identity Verification + Behavior Alert + Document Capture and Reuse + Electronic Signature
idcheck
Liveness + Identity Verification + Risk Score
idunicodocssign
Liveness + Identity Verification + Document Capture and Reuse + Electronic Signature
iddocs
Liveness + Identity Verification + Risk Score + Document Capture and Reuse
idsign
Liveness + Identity Verification + Risk Score + Electronic Signature
iddocssign
Liveness + Identity Verification + Risk Score + Document Capture and Reuse + Electronic Signature
idchecktrust
Liveness + Identity Verification + Risk Score + Behavior Alert
idchecktrustdocs
Liveness + Identity Verification + Risk Score + Behavior Alert
idchecktrustsign
Liveness + Identity Verification + Risk Score + Behavior Alert + Electronic Signature
idchecktrustdocssign
Liveness + Identity Verification + Risk Score + Behavior Alert + Document Capture and Reuse + Electronic Signature
idcheckserpro
Liveness + Identity Verification + Risk Score + Serpro Similarity Return
creditoconsignado
Liveness + Identity Verification + Risk Score + Serpro Similarity Return + Electronic Signature
This flow works conditionally:
If the similarity result from Serpro is positive, we request the electronic signature;
If the similarity result from Serpro is negative, we ask for the user's documents to perform the facematch:
If the facematch result is positive, we request the electronic signature;
If the facematch result is negative, we end the journey without requesting the electronic signature.
idcheckserprodocssign
Liveness + Identity Verification + Risk Score + Serpro Similarity Return + Document Capture and Reuse + Electronic Signature
idcheckserprodocs
Liveness + Identity Verification + Risk Score + Serpro Similarity Return + Document Capture and Reuse
idtoken
Liveness + Validation (1:1)
idtokentrust
Liveness + Validation (1:1) + Behavior Alert
idtokensign
Liveness + Validation (1:1) + Electronic Signature
In this section, you will find examples of CreateProcess requests in Unico
This payload is used to create the following flows:
idlive / id / idlivetrust / idtrust / idcheck / iddocs / idchecktrust / idchecktrustdocs / idcheckserpro / idcheckserprodocs.
This payload is used to create the following flows:
idsign / iddocssign / idchecktrustsign / idchecktrustdocssign / creditoconsignado / idcheckserprodocssign / idtrustdocssign / idunicodocssign.
This payload is used to create the following flows:
idtoken / idtokentrust.
This payload is used to create the following flows:
idtokensign.
To use Postman, follow these steps:
Select the POST method.
Enter the URL https://api.cadastro.uat.unico.app/client/v1/process/
.
Select the Authorization tab.
From the Type dropdown list, choose Bearer Token.
Enter the obtained token in the Token field with the prefix Bearer.
Select the Body tab and enter the data below according to your requirements.
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.
In this section, you will find the possible errors that may occur when trying to authenticate on the Unico IDCloud platform.
The errors returned in the request can be identified by the codes below and have the following structure:
1.0.1
Check if the ID provided in the formation of "iss" is the correct tenant ID given during the generation of the private key.
1.0.14
Check with the project manager if the application being used is active.
1.1.1
The "scope" parameter was not provided in the payload of the JWT used in the request.
1.2.4
The JWT used in the request has expired. Check the value specified in the "exp" field of the payload.
1.2.5
The JWT used in the request cannot be validated. Verify the parameters provided and ensure that it was signed correctly.
1.2.6
The private key used to sign the JWT in the request is no longer acceptable. Request new credentials for the account used.
1.2.7
The JWT used in the request is no longer acceptable as it has already been used. Generate a new token to make a new request.
1.2.11
The account used is not active.
1.2.14
The account used does not have the necessary permissions.
1.2.18
The account used has been temporarily locked due to exceeding the number of invalid authentication attempts.
1.2.19
The account used is not authorized to impersonate another user account (remove the "sub" parameter from the payload).
1.2.20 1.2.21
Failed to decode the JWT used in the request. Use a new token by including only the fields specified in the "Mandatory Fields" and "Additional Fields" sections, adhering to the naming, semantics, and type of each field.
1.2.22
The JWT used in the request contains additional fields in the payload that are not allowed. Use a new token by including only the fields specified in the "Mandatory Fields" and "Additional Fields" sections, adhering to the naming, semantics, and type of each field.
1.3.1
The account used has source IP restrictions.
1.3.2
The account used has access date/time restrictions.
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.
In this section, you will find how to obtain the result of a process in by Unico through the REST API
In this section, you will find detailed documentation on how the Process Result Query endpoint works in by Unico.
Your API requests are authenticated using an access token. Any request that does not include a valid access token will return an error.
You can learn more about generating an access token here.
Endpoints:
Produção: https://api.cadastro.unico.app.
Processes must be created exclusively through backend-to-backend communication, due to our CORS policy, which prevents processes from being created through frontend-to-backend communication.
The content returned in the process.services.documents.doc.data parameter, referring to the OCR Extraction technology, can be consulted below:
If we are unable to extract a field from the document, it is not listed in the API return.
Tips:
To implement your business rules, always validate the response from the capabilities by checking the parameters in the following order:
state = PROCESS_STATE_FINISHED
AND result = PROCESS_RESULT_OK
;
THEN, you can proceed with decision-making by analyzing the authenticationInfo
parameter.
If you receive state = PROCESS_STATE_FINISHED
with results result = PROCESS_RESULT_INVALID_IDENTITY
or PROCESS_RESULT_ERROR
, interpret this as an error in the biometric process and attempt the process again.
To enhance your operation's performance, you can utilize our Webhooks and only query the results of processes with a finalized status;
For more details about the scenarios you may receive in the response, refer to the Response Scenarios section.
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.
In this section, you will find instructions on how to obtain the selfie from a process in by Unico via the REST API
In this section, you will find detailed documentation on how the User Selfie Retrieval endpoint works in by Unico. This endpoint provides the user’s selfie, with a watermark, from completed processes, allowing you to use it as support in cases of user disputes.
Your API requests are authenticated using an access token. Any request that does not include a valid access token will return an error.
You can learn more about generating an access token here.
Endpoints:
Produção: https://api.cadastro.unico.app.
Processes must be created exclusively through backend-to-backend communication, due to our CORS policy, which prevents processes from being created through frontend-to-backend communication.
Important:
The permission to obtain the user's selfie will depend on Unico's internal evaluation. Understand with the person responsible for your project whether you will be able to consume this service;
It is only possible to get the selfie with the watermark;
The user’s selfie is only available for consultation via REST API for 8 hours after the biometric process is completed. After this period, it is not possible to retrieve the user’s selfie.
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.
In this section, you will find instructions on how to obtain the evidential set from a process in by Unico via the REST API
In this section, you will find detailed documentation on how the Proof Set Retrieval endpoint works in by Unico. This endpoint will provide the proof set of the completed biometric transaction, allowing you to store it for potential future disputes by the end user.
To learn more about the proof set, see the Specification if the evidenctial section.
Your API requests are authenticated using an access token. Any request that does not include a valid access token will return an error.
You can learn more about generating an access token here.
Endpoints:
Produção: https://api.cadastro.unico.app.
Processes must be created exclusively through backend-to-backend communication, due to our CORS policy, which prevents processes from being created through frontend-to-backend communication.
The evidential set from the biometric capture is only available for consultation via the REST API for 2 hours after the completion of the biometric process. After this period, it is no longer possible to retrieve the evidence set.
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.
In this section, you will find all the specifications of the evidential set from by Unico
The evidential set is a .pdf document containing authentication evidence of a user who underwent identity validation at by Unico.
Below, you will see how this document is represented, as well as the specification of its return fields:
These evidences can be used to ensure the authenticity of the process.
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.
In this section, you will find a description of all the capabilities of the Unico IDCloud platform
Below, you will find a detailed explanation of how each capability works:
hen there is a need to verify that a person is real and alive at the time of the operation, this capability can be used either in isolation or in conjunction with the capabilities of Identity Verification, Behavior Alert, Risk Scoring, and Validation (1:1). It should always be used alongside the SDKs.
The possible responses are:
YES: indicates that the user is alive at the time of the selfie capture.
NO: indicates that the user is not alive at the time of the selfie capture.
Commonly referred to as IDLive or Smartlive/Liveness with Interaction.
When there is a need to ensure that the user performing the process is who they claim to be, this capability is typically used in conjunction with the Liveness capability.
The possible responses are:
YES: indicates that the face matches the actual holder of the CPF (Cadastro de Pessoas Físicas).
NO: indicates that the face does not match the actual holder of the CPF.
INCONCLUSIVE: indicates that there is insufficient evidence to determine whether the face matches the actual holder of the CPF.
Commonly referred to as IDUnico.
Behavior Alert complements the Identity Verification response by adding a behavioral component that provides certainty regarding the risk associated with that identity, based on previous fraudulent behavior. It can only be used in conjunction with the Identity Verification capability.
The possible responses are:
YES: indicates that the face has been involved in fraudulent identity transactions.
INCONCLUSIVE: indicates that there is insufficient evidence to determine whether the face has been involved in fraudulent transactions in our database.
Commonly referred to as Trust or IDTrust.
The Risk Score capability is being discontinued and will only be available for exceptional cases. To verify your eligibility, please contact your account representative.
When there is a need to obtain a probability score regarding whether the user performing the process is who they claim to be, this capability can only be used in orchestration with the Identity Verification capability when its response is "INCONCLUSIVE".
The possible responses are:
Positive Score: can range from +10 to +100. The higher the score, the greater the probability that the face matches the actual holder of the CPF (Cadastro de Pessoas Físicas).
Zero Score: indicates that there is an error in the registration. A new capture is recommended.
Negative Score: can range from -10 to -100. The lower the score, the greater the probability that the face does not match the actual holder of the CPF.
Negative
Between -40 and -100
We recommend denying the registration
Negative
Between -10 and -39
We recommend that the client assess the associated risks before making a decision
Neutral
Zero Score
We recommend denying the registration and asking the user to capture a new photo of the actual holder of the CPF
Positive
Between +10 and +49
We recommend that the client evaluate the risks involved in making a decision
Positive
Between +50 and +100
We recommend approving the registration
Commonly referred to as Check or Unico Check.
When there is a need to recognize whether the person in the operation is the same one who completed the registration, this capability is typically used in conjunction with the Liveness. It can only be used in cases where an Identity Verification process has already been performed.
The possible responses are:
YES: indicates that the face performing the transaction is the same one that carried out the process used as reference;
NO: indicates that the face performing the transaction is not the same one that carried out the process used as reference.
Commonly referred to as Biometric Token or Transactional Token.
When there is a need to request, store, and reuse documents, we offer the ability to leverage users' personal documents (Passport, CIN, RG, and CNH—both digital and physical), reducing friction. If we do not have the documents in our database, it is possible to capture them.
This capability can only be used in conjunction with the Identity Verification capability. For document validation, we use the following technologies:
Typification: indicates whether the provided document is valid or not.
OCR: involves extracting data from the document based on an image.
FaceMatch: involves comparing the face in the selfie with the face on the document.
CPF Match: involves searching for a specific CPF in the provided document.
Commonly referred to as IDDOCS.
When there is a need to use biometrics to sign a document, utilize the same method of user authentication throughout the journey to finalize the operation with the contract signature.
*The electronic signature capability is only available through the by Unico integration mode in flows that involve other capabilities. See more in the Possible Flows section.
Commonly referred to as SIGN or IDSIGN.
The Serpro similarity return is not a native capability of IDCloud but rather an additional feature incorporated to comply with a regulation from Dataprev concerning INSS payroll credit operations aimed at retirees and pensioners.
Since these operations require the SERPRO similarity return, the IDCloud platform has been adjusted to include this functionality as an option in the product. When using the SERPRO similarity feature, the API response will be the score of similarity.
Commonly referred to as IDSerpro.
When Serpro finds the face, it returns a score from 0-100, as in the example below:
When Serpro does not find the face, the score -1 is returned, as in the example below:
When there is an error in the integration with Serpro, the score -2 is returned, as in the example below:
To understand how you can use each of the capabilities, be sure to visit the "Integration Methods" section at the link below:
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.
In this section, you will find how to obtain the signed document of a process in by Unico through the REST API
In this section, you will find detailed documentation on how the Signed Document Retrieval endpoint works in by Unico. This endpoint will provide the signed document of the end user in flows that have the Electronic Signature capability.
Your API requests are authenticated using an access token. Any request that does not include a valid access token will return an error.
You can learn more about generating an access token here.
Endpoints:
UAT: ;
Production: .
If the return of the signed document via by Unico is delayed in processing, we recommend waiting at least one minute after the process is completed before performing the query. Additionally, it is important to set up an automatic retry policy for cases where the signed document is not yet available, such as making up to 10 attempts with intervals of 1 to 5 minutes between them.
In this section, you will find how to obtain the signed document of a process in by Unico through the REST API
In this section, you will find detailed documentation on how the Signed Document Proof Set Retrieval endpoint works in by Unico. This endpoint will provide the proof set of the end user's signature in flows that have the Electronic Signature capability.
Your API requests are authenticated using an access token. Any request that does not include a valid access token will return an error.
You can learn more about generating an access token here.
Endpoints:
UAT: ;
Production: .
In this section, you will find how to implement the Unico SDK in your web application for using the by Unico
The use of integrations that do not comply with the standards outlined in this documentation may result in unexpected system interruptions, which will not be covered or supported by by Unico.
Examples: Embedding the by Unico SDK (iFrame) within a webview, implementing the iFrame using an HTML tag, etc.
To use by Unico through the Unico Web SDK, the first step is to register the domains that will be used as hosts to display the user journey experience.
Please inform the person responsible for your integration project or the Unico support team to carry out this configuration.
To begin using the SDK, we should start with the installation of the Unico web SDK:. by Unico uses the same SDK that is used for IDPay:
When installing the Unico SDK package, deploy without specifying the version you are using so that your dependency manager always updates minors and patches to the latest version.
To check previous versions, go to .
This method initializes the SDK by preloading assets, creating a smoother experience for the end user. At this point, it is necessary to send the token received as a result of the CreateProcess.
Parameters:
options - an object with the following configuration properties:
type
The type of flow to be initialized. In by Unico, we use the "IFRAME" option.
token
Receives the token of the created process. This token is important to authenticate the journey and ensure that only authorized domains can use it (can be obtained when creating the process via API).
This method opens the by Unico experience. For the IFRAME flow, this function displays the already preloaded iFrame and initiates the messaging flow between the client page and the by Unico experience.
Parameters:
options - an object with configuration properties:
processId
Receives the ID of the created process. This ID is important to obtain the process details and carry out the entire flow correctly (can be obtained when creating the process via API).
token
Receives the token of the created process. This token is important to authenticate the journey and ensure that only authorized domains can use it (can be obtained when creating the process via API).
onFinish(process)
Receives a callback function that will be executed at the end of the by Unico journey, passing the process object with the following data: { captureConcluded, concluded, id }
.
The sequence diagram below demonstrates how to use the SDK and the API result from by Unico to configure the iFrame:
After careful analysis of our needs and challenges, we have decided to adopt a solution based on iframes with authentication tokens rather than implementing a Content Security Policy (CSP). This choice was motivated by various considerations related to the security and flexibility required to meet our clients' demands.
Content Security Policy (CSP) is a powerful tool for protecting web applications against various types of attacks, such as Cross-Site Scripting (XSS) and code injection. However, when configuring a CSP policy, it is necessary to define a strict list of trusted domains. This approach is effective when the domains are fixed and predictable. However, for our clients, who often use dynamic and variable domains, this rigid configuration presents significant challenges.
Dynamic domains pose a substantial security risk when using CSP. When a client has domains that frequently change or are created dynamically, it would be necessary to constantly update the CSP policy to include these new domains. This not only increases maintenance efforts but also exposes the domains to which the CSP policy applies. Each domain added to the CSP policy is potentially a vulnerability point if not adequately managed.
To mitigate these risks and meet the flexibility required by our clients, we opted to use iframes combined with authentication tokens. This solution provides an additional layer of security and avoids the need to expose or manage an extensive and dynamic list of domains.
Secure Authentication: Each iframe is loaded with a unique authentication token for each transaction, ensuring that only authorized users can access the content. This token is verified in real-time, providing an additional layer of security and control.
Content Isolation: The use of iframes allows for the isolation of content in a separate context, reducing the risk of interference between different origins and mitigating potential attacks.
Flexibility for Dynamic Domains: By not relying on a static CSP policy, our solution easily adapts to our clients' dynamic domains without the need for constant updates to security policies.
In this section, you will find the Postman collection with the REST APIs of by Unico
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 .
In this section, you will find information on how to redirect a user in your applications within the by Unico experience
he userRedirectUrl
field is used to direct the user. This field is received in the success response of the process creation when making the CreateProcess request.
Here you will find three ways to manage the user experience in web applications:
It is recommended to follow these steps:
In your common flow (which includes the by Unico Registration), you will redirect the client to the link generated through the API;
After that, the client within the platform carries out the necessary procedures to continue the flow;
When completed, they are redirected to your page (using the redirectUrl provided during the process creation).
window.open()
:The window.open() option consists of opening a new tab in the user's browser so that they can complete the process. At the end, this tab is closed and redirected to your application.
For this, it is recommended to:
Follow the public documentation on this, which can be found ;
Monitorar se houve alteração de URL (para a redirectUrl) e então fechar a aba utilizando window.close().
1 - Add the necessary dependency for using CustomTabs in your app/build.gradle:
Add the necessary permissions and intents in the AndroidManifest.xml for the Activity that you want to receive the callback_uri.
It is necessary to include the attribute android:launchMode="singleTop"
as well as the <data>
tag providing the URI data.
The following permissions are necessary for it to function correctly:
Camera
Geolocation
o retrieve redirect information with the provided data, you can use the following code in the onNewIntent
method of your Activity:
1 - O primeiro passo é criar o controlador de autenticação, e, para isso crie uma classe chamada UnicoAuthenticationController
(ou como preferir chamar).
2 - Na sequência, importe o framework AuthenticationServices
no topo da classe.
3 - Declare a classe como NSObject e implemente o protocolo ASWebAuthenticationPresentationContextProviding
.
O resultado deve ser:
1 - Abra o arquivo onde você executa a autenticação e adicione as importações necessárias (como exemplo, o ContentView.swift é usado).
2 - Para controlar o estado do fluxo é preciso criar a propriedade @State
.
3 - Crie uma instância da classe UnicoAuthenticationController
fora do corpo da estrutura ContentView.
4 - Para a validação do processo, crie uma função chamada redirectUser
.
Ambientes:
Lembre-se de alterar a url URL_AUTHENTICATION
para a URL de autenticação recebida em seu processo e também o callbackURLScheme BUNDLE
para o redirect informado na criação do processo (o uso do Bundle Identifier de seu aplicativo é recomendado).
Autenticação única:
É importante setar prefersEphemeralWebBrowserSession
para true para garantir uma autenticação única por processo.
It is also possible to use the link generated by Unico in hybrid frameworks. To do this, you can create a bridge between the framework used and the native one and follow as we suggest in the documents or use a library that makes these integration options available.
Integrating WebView into your application is the customer's sole responsibility, as this functionality is not offered as part of Unico's libraries or SDKs. Because of this, we do not offer technical support for questions or problems related to implementing WebView in your application. For configuration guidance, we recommend consulting the official documentation for the technology used in your project (e.g. React Native, Flutter, etc.).
In this section, you will find all response scenarios for by Unico, regardless of whether the processes are completed or not
It occurs when the process has been created but has not yet been completed by the user.
It occurs when the process has been created, but there was an error in the service.
It occurs when the process was created, finalized by the user, and received a POSITIVE response from IDUnico.
It occurs when the process was created, finalized by the user, but received an INCONCLUSIVE response from IDUnico.
It occurs when the process was created, finalized by the user, but received an REFUSED response from IDUnico.
It occurs when the process was created, completed by the user, but received a failure response for the Liveness.
It occurs when the process has been created but has not yet been completed by the user.
It occurs when the process has been created, but there was an error in the service.
It occurs when the process was created, finalized by the user, and received a POSITIVE response from IDUnico.
It occurs when the process was created, completed by the user, received an inconclusive response from IDUnico, but still returned a score from IDCheck.
GetProcess
It occurs when the process was created, finalized by the user, but received an REFUSED response from IDUnico.
It occurs when the process was created, completed by the user, received an inconclusive response from IDUnico, and generated a divergence in IDCheck, which took longer than 60 seconds to be resolved by the divergence engines.
It occurs when the process was created, completed by the user, but received a failure response for the Liveness.
For detailed verification of the API parameters, please refer to the Parameters Specification section.
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 .
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 .
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 .
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 .
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 .
Liveness
Identity Verification
Behavior Alert
Risk Score
Validation (1:1)
Document Capture and Reuse
Electronic Signature
+Serpro similarity return
PROCESS_STATE_CREATED
PROCESS_RESULT_UNSPECIFIED
PROCESS_STATE_FAILED
PROCESS_RESULT_ERROR
PROCESS_STATE_FINISHED
PROCESS_RESULT_OK
PROCESS_STATE_FINISHED
PROCESS_RESULT_OK
PROCESS_STATE_FINISHED
PROCESS_RESULT_INVALID_IDENTITY
PROCESS_STATE_FINISHED
PROCESS_RESULT_INVALID_IDENTITY
PROCESS_STATE_CREATED
PROCESS_RESULT_UNSPECIFIED
PROCESS_STATE_FAILED
PROCESS_RESULT_ERROR
PROCESS_STATE_FINISHED
PROCESS_RESULT_OK
PROCESS_STATE_FINISHED
PROCESS_RESULT_OK
PROCESS_STATE_FINISHED
PROCESS_RESULT_INVALID_IDENTITY
PROCESS_STATE_FINISHED
PROCESS_RESULT_INVALID_IDENTITY
PROCESS_STATE_FINISHED
PROCESS_RESULT_INVALID_IDENTITY
In this section, you will find all possible response scenarios for completed processes in by Unico
The response examples above consider only processes with state = PROCESS_STATE_FINISHED
and result = PROCESS_RESULT_OK
. To see responses that do not consider only these conditions, refer to the Response Scenarios section
For detailed verification of the API parameters, please refer to the Parameters Specification section.
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.
Nesta seção, você encontrará todas as especificações técnicas das APIs REST do IDCloud, utilizando o meio de integração by Client
In this section, you will find all the technical specifications for By Client REST APIs
by Client is a channel that provides clients with complete freedom to leverage the identity validation solutions offered by the IDCloud platform.
Its purpose is to offer a wide range of possibilities for using IDCloud platform capabilities, providing a solution that can be integrated into your back-end and allowing flexibility for clients who wish to control user experiences with their own front-end (read about the Capture Standard for more information) or through our SDKs.
by Client is an integration method for Unico IDCloud that allows clients to integrate however they see fit, combining platform capabilities as needed. This integration method provides the necessary resources to perform Liveness, Identity Verification, Behavior Alert, Risk Score, Document Capture and Reuse.
You can combine the capabilities as desired for even the most distinct use cases. However, you must have API Keys configured with the desired capabilities for proper usage.
To request the capabilities in the API Key, contact the person responsible for your integration project or the Unico support team to set up this configuration.
In by Client, there are capabilities with synchronous responses (meaning the response is provided immediately upon process creation) and asynchronous capabilities (where data processing requires that you "retrieve" the result through a GET method on the REST API).
In your operation, you can combine capabilities as you see fit, but each capability has its own communication method. For example:
You can have an operation that uses the capabilities of Identity Verification + Behavior Alert + Risk Score;
When creating the process, the response from the Identity Verification and Behavior Alert capabilities will be synchronous, within the same API response for process creation.
On the other hand, the Risk Score capability will be executed asynchronously, requiring you to wait for its processing and then make another GET request to obtain the final result of the process.
Below are the synchronous and asynchronous capabilities:
Validation (1:1)
Just like the Identity Verification capability is a "synchronous" capability, it can also be configured for "asynchronous" use.
Just like the Behavior Alert capability is a "synchronous" capability, it can also be configured for "asynchronous" use.
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.
In this section, you will find the specifics of creating a process that has Liveness + Identity Verification as a capabilities
In this section, you will find detailed documentation about the functionality of the endpoint related to the "Liveness" + "Identity Verification" capabilities, used together.
These are two synchronous capabilities, meaning the entire integration occurs using a single endpoint.
The capabilities of the Unico IDCloud platform byClient are managed through API Keys—used as a parameter in the request headers—that define the access scope. As a prerequisite, it is necessary to have an API Key configured with the "Liveness" + "Identity Verification" capabilities, ensuring dedicated and secure access to the resource.
Talk to your project manager to obtain the API Key with this configuration.
Your API requests are authenticated using an access token. Any request that does not include a valid access token will return an error.
You can learn more about generating an access token here.
Endpoints:
Production: https://api.id.unico.app.
Important:
If the response for the "Identity Verification" capability returns unicoId = yes
, this result already includes the Liveness (i.e., the liveness
parameter will not be included in the response);
To use the "Liveness" capability, it is mandatory to use our SDKs:
It is possible to use the "Identity Verification" capability without the "Liveness". For this use case, the liveness value will always return as liveness = 1
. In this scenario, no "Liveness" validation is performed, not even passive validation.
If an error occurs during processing, the process will return a status = 5
, as shown in the example below:
Tips:
For this use case, there is no need to Get the Process Result, as the response is synchronous;
When implementing your business rules, always validate the final statuses of the processes (3
, 5
). To validate the response of IDCloud capabilities, only consider status = 3
for your decision-making process;
For more details on the scenarios you might receive in the response, refer to the Response Scenarios section;
For more information about possible errors for this endpoint, refer to the Errors section.
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.
In this section, you will find the specifics of creating a process that includes the 1:1 Validation capability
In this section, you will find detailed documentation about the functionality of the endpoint related to the Liveness + 1:1 Validation capabilities, used together.
These are two synchronous capabilities, meaning the entire integration occurs using a single endpoint.
The capabilities of the Unico IDCloud platform via Client are managed through API Keys—used as a parameter in the request headers—that define the access scope. As a prerequisite, it is necessary to have an API Key configured with the Liveness + 1:1 Validation capabilities, ensuring dedicated and secure access to the resource.
Talk to your project manager to obtain the API Key with this configuration.
Your API requests are authenticated using an access token. Any request that does not include a valid access token will return an error.
You can learn more about generating an access token here.
Endpoints:
Production: https://api.id.unico.app.
Important:
To use the "Liveness" capability, it is mandatory to use our SDKs:
It is possible to use the "Validation 91:1)" capability without the "Liveness". For this use case, the liveness
value will always return as liveness = 1
. In this scenario, no "Liveness" validation is performed, not even passive validation.
Tips:
For this use case, there is no need to Query the Process Result, as the response is synchronous;
For more information about possible errors for this endpoint, refer to the Errors section.
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.
In this section, you will find the specifics of creating a process that includes Liveness + 1:1 Validation + Behavior Alert as capabilities.
In this section, you will find detailed documentation on the operation of the endpoint related to the capabilities Liveness + 1:1 Validation + Behavior Alert, used together.
These are three synchronous capabilities, meaning the entire integration takes place using a single endpoint.
The capabilities of the Unico IDCloud platform via by Client are managed through API Keys - used as a parameter in the request header - which define the scope of access. As a prerequisite, it is necessary to have an API Key configured with the Liveness + 1:1 Validation + Behavior Alert capabilities, ensuring dedicated and secure access to the resource.
Talk to your project manager to obtain the API Key with this configuration.
Your API requests are authenticated using an access token. Any request that does not include a valid access token will return an error.
You can learn more about generating an access token here.
Endpoints:
Production: https://api.id.unico.app.
Important:
To use the liveness capability, it is essential to use our SDKs:
It is possible to use the Validation (1:1) capability without liveness. In this use case, we will not return the liveness
parameter in the API response. In this scenario, there is no validation of the liveness, not even passive.
If an error occurs during processing, the process will return a status = 5
, as shown in the example below:
Tips:
For this use case, there is no need to Query the Process Result, as the response is synchronous;
For more information about possible errors for this endpoint, refer to the Errors section.
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.
In this section, you will find the specifics of creating a process that has Liveness + Identity Verification + Risk score as a capabilities
In this section, you will find detailed documentation about the functionality of the endpoints related to the Liveness + Identity Verification + Risk Score capabilities, used together.
These consist of two synchronous capabilities (Liveness + Identity Verification) integrated with one asynchronous capability (Risk Score). In other words, while most processes will return synchronous responses, some will be orchestrated with the Risk Score and will require subsequent queries.
For this integration, it will be necessary to consume two endpoints described in this documentation, which can also be combined with the use of Webhooks.
The capabilities of the Unico IDCloud platform via Client are managed through API Keys—used as a parameter in the request headers—that define the access scope. As a prerequisite, it is necessary to have an API Key configured with the Liveness + Identity Verification + Risk Score capabilities, ensuring dedicated and secure access to the resource.
Talk to your project manager to obtain the API Key with this configuration.
Your API requests are authenticated using an access token. Any request that does not include a valid access token will return an error.
You can learn more about generating an access token here.
Endpoints:
Production: https://api.id.unico.app.
Important:
If the response for the Identity Verification capability returns unicoId = yes
, this result already includes Liveness (i.e., the liveness
parameter will not be included in the response);
To use the Liveness capability, it is mandatory to use our SDKs;
It is possible to use the Identity Verification capability without Liveness. For this use case, the liveness
value will always return as liveness = 1
. In this scenario, no Liveness validation is performed, not even passive validation.
If the response for the Identity Verification capability is unicoId = inconclusive
, orchestration with the Risk Score capability will occur. Therefore, it will be necessary to Get the Process Result (endpoint described below), as the Risk Score response is asynchronous.
If an error occurs during processing, the process will return a status = 5
, as shown in the example below:
Tips:
When implementing your business rules, always validate the final statuses of the processes (3
, 5
). To validate the response of IDCloud capabilities, only consider status = 3
for your decision-making process:
A percentage of your operation will have a conclusive response from the Identity Verification capability (yes
or no
). For these, you can decide whether to approve or reject the registration without needing to Get the Process Result;
For cases where the response from the Identity Verification capability is inconclusive (inconclusive
), it will be necessary to Get the Process Result.
In the v2 endpoint (/processes/v2/{id}
), we also return additional user information, as shown in the example below:
Attention:
When making a GET request for a process with status = 5
(error), the return status code will be 410 (Gone)
instead of 200 (Success)
;
There may be cases of drops during orchestration with the Risk Score capability. In this scenario, the process will have the following combination: {status = 3
, unicoId = inconclusive
, liveness = 1
, and NO score in the API response}. Learn more in the Response Scenarios section;
If you query a process with status = 2
, implement polling until you receive status = 3
or implement Unico's Webhook to know when to get the result.
Tips:
When implementing your business rules, always validate the final statuses of the processes (3
, 4
, 5
). To validate the response of IDCloud capabilities, only consider status = 3
for your decision-making process;
To improve the performance of your operation, you can use our Webhooks and only query the results of processes that have a finalized status;
For more details on the scenarios you might receive in the response, refer to the Response Scenarios section;
For more information about possible errors for this endpoint, refer to the Errors section.
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.
In this section, you will find the specifics of creating a process that has Liveness + Identity Verification + Behavior Alert as a capabilities
IIn this section, you will find detailed documentation on how the endpoints related to the Liveness + Identity Verification + Behavior Alert capabilities work when used together.
These are three synchronous capabilities (Liveness + Identity Verification + Behavior Alert), meaning that the entire integration occurs using a single endpoint.
The capabilities of the Unico IDCloud platform via by Client are managed through API Keys - used as a parameter in the request headers - which define the access scope. As a prerequisite, you must have an API Key configured with the Liveness + Identity Verification + Behavior Alert capabilities, ensuring dedicated and secure access to the resource.
Talk to your project manager to obtain the API Key with this configuration.
Your API requests are authenticated using an access token. Any request that does not include a valid access token will return an error.
You can learn more about generating an access token here.
Endpoints:
Production: https://api.id.unico.app.
Important:
If the response for the Identity Verification capability returns unicoId = yes
, this result already includes Liveness (i.e., the liveness
parameter will not be included in the response);
The Identity Verification and Behavior Alert capabilities are completely independent. To implement your business rules, make sure to analyze what each return means.
To use the Liveness capability, it is mandatory to use our SDKs;
It is possible to use the Identity Verification capability without Liveness. For this use case, the liveness
value will always return as liveness = 1
. In this scenario, no Liveness validation is performed, not even passive validation.
If an error occurs during processing, the process will return a status = 5
, as shown in the example below:
Tips:
For this use case, there is no need to Query the Process Result, as the response is synchronous.
To implement your business rules, always validate the final statuses of the processes (3
, 5
). To validate the response from the IDCloud capabilities, only consider the status = 3
for your decision-making.
For more information on the scenarios you might receive in the response, refer to the Response Scenarios section.
For more information on possible errors for this endpoint, refer to the Errors section.
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.
In this section, you will find the specifics of creating a process that has Liveness + Identity Verification + Behavior Alert + Risk Score as a capabilities.
In this section, you will find detailed documentation on how the endpoints related to the Liveness + Identity Verification + Behavior Alert capabilities work when used together.
These are three synchronous capabilities (Liveness + Identity Verification + Behavior Alert), meaning that the entire integration occurs using a single endpoint.
The capabilities of the Unico IDCloud platform via by Client are managed through API Keys - used as a parameter in the request headers - which define the access scope. As a prerequisite, you must have an API Key configured with the Liveness + Identity Verification + Behavior Alert capabilities, ensuring dedicated and secure access to the resource.
Talk to your project manager to obtain the API Key with this configuration.
Your API requests are authenticated using an access token. Any request that does not include a valid access token will return an error.
You can learn more about generating an access token here.
Endpoints:
Production: https://api.id.unico.app.
Important:
If the response from the Identity Verification capability is unicoId = yes
, this response already includes the Liveness (meaning you will not receive the liveness
parameter in the response).
The Identity Verification and Behavior Alert capabilities are completely independent. To implement your business rules, make sure to analyze what each return means.
To use the Liveness capability, it is essential to use our SDKs:
It is possible to use the Identity Verification capability without Liveness. In this use case, the liveness return will always be liveness = 1
. In this scenario, there is no validation of the life proof, not even passive validation.
If an error occurs during processing, the process will return a status = 5
, as shown in the example below:
Tips:
For this use case, there is no need to Query the Process Result, as the response is synchronous.
To implement your business rules, always validate the final statuses of the processes (3
, 5
). To validate the response from the IDCloud capabilities, only consider status = 3
for your decision-making.
For more information on the scenarios you might receive in the response, refer to the Response Scenarios section.
For more information on possible errors for this endpoint, refer to the Errors section.
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.
In this section, you will find how the capture standard for the user's selfie should be if you do not use our SDKs
For optimal performance of the IDCloud platform's capabilities, we recommend using our SDKs. They will ensure the best functioning of the product as a whole, both in terms of drop rate and in validating the Liveness.
To achieve better results in image capture, a capture standard has been defined. The image should be clear with sufficient frontal lighting. The face should be straight, facing the camera, free from objects or obstructions, and with a neutral expression.
Common issues in captured images include:
Lighting behind the client: Frontal lighting must be strong enough for a clear capture of the face.
Overexposed lighting: Frontal lighting needs to be adequate for a sharp capture.
Face too close to the camera: The face should be centered in the camera frame with proper lighting.
Blurry images: The person’s face needs to be well-focused at the moment of capture.
Shaky images: Stabilize the camera during capture.
Client wearing glasses: The client should not wear glasses or objects that obstruct full visibility of the face.
For capturing and sending images, the ICAO standard is used. The ICAO (International Civil Aviation Organization) standard consists of characteristics that a photograph must comply with regarding capture and sending configurations:
Face Positioning and Additional Information:
The photo must be taken from the front—looking directly at the camera with the head upright. The face should be centered, and the shoulders must be aligned parallel to the camera's image plane.
The eyes should be naturally open—pupils and irises visible.
Glasses: The photo should be captured without glasses.
No hats, caps, or masks: The facial area must be clearly visible.
Neutral Expression: The face should maintain a neutral expression; the person should not smile, raise eyebrows, squint, or frown.
Hairstyle: Hair should not cover the eye visibility zone.
Lighting and Background:
The background should be light, smooth, and free of texture. It must not have stains, lines, or curves that are visible in the captured image. Light colors like light blue or white can be used, provided there is sufficient contrast between the face/hair area and the background.
The camera's color settings should not change based on the background color. There should be no shadows behind the face, and no visible objects in the background, such as people, furniture, patterned wallpaper, or plants.
The lighting must be adequate and uniform, evenly distributed across the face to avoid differences between the left and right sides. The photo should have brightness and good contrast between hair, face, and background. Poorly lit photos occur when lighting is only on the side, above, or below.
Images should be in JPEG, PNG, or JWT formats.
Captured images must be in color.
Recommended size: Aspect ratio 1920x1080 or 1080x1920;
Orientation: Portrait;
Size: Maximum 800kb, if necessary you can compress it to Jpeg92.
Recommended size: HD aspect ratio - 1280x720 or 720x1280;
Minimum size: VGA aspect ratio - 640x480 or 480x640;
Orientation: There is no restriction regarding portrait or landscape orientation;
Size: Maximum 800kb, if necessary you can compress it to Jpeg92.
The photo must include:
Color
Proper framing
Sharp and clear focus, free of ink marks or creases.
Look directly at the camera.
Show the natural skin tone.
Have appropriate brightness and contrast.
Neutral expression and eyes clearly visible.
No hair covering the eyes.
Facing the camera directly, without looking over the shoulder or tilted, and showing both edges of the face clearly.
With a simple light-colored background, preferably white.
With even lighting, no shadows or flash reflections on the face, and without red-eye.
No colored contact lenses.
No makeup.
The use of glasses is not recommended; however, if necessary:
The eyes must be clear, without reflections from flash or ambient light on the glasses, and without colored lenses.
The frame must not cover any part of the eyes.
Add instructions before capturing for the user:
Use capture "frames" to guide the client's positioning in front of the camera:
In this section, you will find how the QR Code flow works for desktop experiences.
By Unico provides the QR code functionality to facilitate the flow on desktop devices. Through the QR code, it is possible to start the By Unico in a web experience without having to worry about whether the user's device has a camera or not. In this way:
We reduce the chance of failure in biometric capture;
We ensure a better experience in other capabilities;
We increase the chances of conversion.
Talk to the person responsible for your project to activate the feature.
When the user starts By Unico through a desktop device:
We identified that it's a desktop device and provided the QR code so the user can continue the journey on their mobile:
Once scanned, the user continues their journey on the mobile as usual, while the desktop device waits for the completion:
The desktop device detects that the journey was completed on the mobile and redirects the user to the originating experience:
The user can continue their journey in the originating experience on the desktop as usual:
Screen size: minimum width of 961px;
Screen orientation: landscape;
User-Agent: must not be a mobile device.
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.
In this section, you will find all the customizations available in by Unico
By Unico provides some customizations in its interface, adapting to customer preferences to deliver a personalized and meaningful experience.
It is possible to customize the logo displayed to the end user, as shown in the image below:
To request the inclusion of this logo, it is necessary to send the Unico team a URL of the logo, ensuring that it is hosted in an online directory (meaning this logo must be accessible via a URL in the browser).
It is not possible to register a URL that is in base64 format (usually, these URLs start with "data:image/jpeg;base64,/9j/4AAQ...").
For a better rendering of the logo, we advise you to use an iconographic image.
During the implementation process, it is possible to request the configuration of the button color and shape in the By Unico interface according to the company's visual identity, as shown in the images below:
To configure this, simply send the following information to the Unico team:
Hexadecimal code of the background color on the button.
Ex: #000000.
Hexadecimal code of the text color on the button.
Ex: #ffffff.
Corner rounding of the button in pixels.
Ex: 10px.
It is possible to customize the contextualization screen presented to the end user at the beginning of the journey, as shown in the image below:
To customize the information on the contextualization screen, you should modify the values of the parameters contained in the contextualization
object at the time of making the CreateProcess
call. The section in the request that should be altered is as follows:
To understand in detail what each parameter means, be sure to consult the corresponding section here.
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.
In this section, you will find the specific details on creating a process that includes Document Capture and Reuse as a capability
In this section, you will find detailed documentation about the functionality of the endpoints related to the Document Capture and Reuse capability. The use of Reuse requires that there be a previous Identity Verification process and this must obtain a “YES” response OR the Risk Score equal or more than +50, otherwise it will be necessary to capture the user's document.
This is an synchronous capability that requires consuming two endpoints, detailed in this documentation, for its full utilization.
The capabilities of the Unico IDCloud platform via Client are managed through API Keys—used as a parameter in the request headers—that define the access scope. As a prerequisite, it is necessary to have an API Key configured exclusively for the Document Capture and Reuse capability, ensuring dedicated and secure access to the resource.
Talk to your project manager to obtain the API Key with this configuration.
Your API requests are authenticated using an access token. Any request that does not include a valid access token will return an error.
You can learn more about generating an access token here.
Endpoints:
UAT: ;
Production: .
If you find a document to be reused, in the process creation endpoint you will enter the ID of this document in the document.documentId
parameter and it will not be necessary to capture the document and send the base64 in the document.files
parameter.
Important:
To use the Document Capture and Reuse capability, the Identity Verification capability must be used beforehand, as it is necessary to include the processId
obtained from the Identity Verification in the document.authProcessId
parameter:
The process must have valid biometrics, be used within 24 hours of completion and cannot be reused.
If we are unable to extract a field from the document, it is not listed in the API return;
If an error occurs during processing, the process will return a status = 5
, as shown in the example below:
Content returned in document.content based on document.type:
Tips:
When implementing your business rules, always validate the final statuses of the processes (3
, 5
). To validate the response of IDCloud capabilities, only consider status = 3
for your decision-making process;
For more information about possible errors for this endpoint, refer to the Errors section.
In this section, you will find an explanation of the error status codes for the Unico IDCloud Platform
Unico IDCloud uses conventional HTTP response codes to indicate the success or failure of an API request.
As a general rule:
Codes in the 2xx
range indicate success.
Codes in the 4xx
range indicate incorrect or incomplete parameters (e.g. a required parameter was omitted, or an operation failed with a 3rd party, etc.).
Codes in the 5xx
range indicate an error with Unico's servers.
Unico IDCloud also outputs an error message and an error code formatted in JSON:
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 .
In this section, you will find the possible responses for the combinations of capabilities separated by their methods to facilitate your understanding of the by Client integration
Understanding how the return of each parameter works is essential for implementing the best decision-making. To see in detail the meaning of each parameter, see the section Parameter Specification
In all the combinations described below, if an error occurs during processing, the process will return a status = 5. For this reason, the scenarios below do not display responses related to this condition. Example:
For the scenarios where the response in CreateProcess is the same as the response from GetProcess, optimize your application and make your decision synchronously.
For the scenarios where the response in CreateProcess
is the same as the response from GetProcess
, optimize your application and make your decision synchronously.
For the scenarios where the response in CreateProcess
is the same as the responsefrom GetProcess
, optimize your application and make your decision synchronously.
In this section, you will find information about how the Webhook of the Unico IDCloud platform works
The respective GetProcess articles for integration methods describe a way to obtain the status of a process through a call to an endpoint. This allows for polling to receive information about created processes, meaning the endpoint can be called multiple times for the same process to obtain the most recent status.
With the use of webhooks, it's possible to notify a specific endpoint every time the status of a process changes.
A webhook is a notification service that enables asynchronous integration between systems, where one system notifies another through a trigger. This allows webhooks to keep systems updated with the latest information without the need for constant polling for updates.
To configure the webhook, the following information is required:
Notification URL: This is the endpoint used by By Unico for notifications about status updates.
Authentication Type: This is the authentication method used to invoke the endpoint. The following options are available:
Basic Authorization;
API Key;
No authentication.
Secret: This indicates a secret used for authentication. The secret is only necessary when the authentication type is Basic Authorization or API Key:
For Basic Authentication, it must be sent in the format user:pass
.
For API Key, it can be sent in two formats:
header:value
, when a specific header name is desired;
value
, when the desired header is the Authorization.
Retry Settings: Indicates the number of attempts in case of a failure in calling the endpoint:
Maximum number of attempts
Interval between attempts (in seconds)
Rate Limit: Maximum number of simultaneous sends (maximum: 500).
Timeout: Maximum wait time for the endpoint's response (in seconds).
Status to be Notified: Currently, the notification is sent whenever the state of a process changes to:
About the authentication:
The API can be protected by an authentication method such as Basic Authentication or API Key. A list of valid IPs for access can also be defined for additional protection.
By configuring a webhook on the platform, you can receive information about processes through notifications sent to an API endpoint developed by you to receive these updates.
The information sent by the platform to the API includes:
The request should be a POST method in a REST API, making it easier and safer to send information. All fields must be mandatory. The body of the request should accept the transaction ID and the state, as shown in the following example:
About response status:
Currently, the platform has a set of statuses that may vary in the future. Therefore, it is recommended that the statuses of interest for taking action be configurable.
The response must come synchronously. The status for successful requests should be in the range of 200 to 299. Any other status is considered a failure, and the platform will retry notifications (with exponential backoff between them) until receiving a 2xx response or until reaching the maximum number of attempts.
In this section, you will find the specifics of creating a process that only has the Liveness capability
In this section, you will find detailed documentation about the functionality of the endpoint related to the "Liveness" capability, used in isolation.
This is a synchronous capability, meaning the entire integration occurs using a single endpoint.
The capabilities of the Unico IDCloud platform by Client are managed through API Keys - used as a parameter in the request headers—that define the access scope. As a prerequisite, it is necessary to have an API Key configured exclusively for the "Liveness" capability, ensuring dedicated and secure access to the resource.
Talk to your project manager to obtain the API Key with this configuration.
Your API requests are authenticated using an access token. Any request that does not include a valid access token will return an error.
You can learn more about generating an access token here.
Endpoints:
UAT: ;
Production: .
Important:
To use the "Liveness" capability, it is mandatory to use our SDKs;
If an error occurs during biometric processing, the request will return a status code = 200
, and the process will return a status = 5
, as shown in the example below:
Tips:
For this use case, there is no need to Get the Process Result, as the response is synchronous;
When implementing your business rules, always validate the final statuses of the processes (3
, 5
). To validate the response of IDCloud capabilities, only consider status
= 3
for your decision-making process;
For more details on the scenarios you might receive in the response, refer to the Response Scenarios section;
For more information about possible errors for this endpoint, refer to the Errors section.
Note: Images taken from the guide "ICAO Guide for MRTD Photo Guidelines. ICAO. Icao guide for mrtd photo guidelines.
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 .
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 .
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 .
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 .
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 .
finished
: Process finished.
2
: In divergence;
3
: Completed;
4
: Canceled;
5
: Error.
processId
: ID of the transaction;
state
: State of the transaction;
flow
: Journey of the transaction.
id
: ID of the transaction;
status
: State of the transaction.
In this section, you will find all the necessary information for using and integrating the Unico IDCloud platform SDK into your Android applications
In this section, you will find the update policy for using the SDK
It is essential that all clients maintain a routine of updating the SDK, as new forms of attack are developed all the time. The best way to protect your business against new types of injection and liveness fraud is to use the most up-to-date version of the Unico SDK.
It is the client's responsibility to maintain a healthy routine of SDK updates, ensuring the minimum version for the proper functioning of our solutions in their operations. Likewise, it is Unico's responsibility to provide updated versions concerning the threats that arise in the market and to keep our clients informed about the topic. With this in mind, Unico has created an SDK update policy.
With outdated SDKs, our clients are vulnerable to attacks from fraudsters. Considering that Unico values the utmost security of its clients, along with the urgency of the topic and the need for an agile update process, the SDK update policy was created to safeguard our clients against the newest frauds that constantly appear in the market. The only way to be secure is to stay updated.
Unico categorizes all SDK updates as Critical and Non-Critical, based on the severity of the frauds we block with the new version.
Critical Updates: These updates aim to protect our clients against recent frauds and attacks in the market. They must be implemented within 5 (five) calendar days, considering the real threat that the operation is exposed to. After this period, we will no longer provide support for previous versions. In practice, clients contacting us with a version prior to the latest will be required to update the SDK to receive assistance.
Non-Critical Updates: These are simpler updates aimed at improving technology. They can be implemented within 60 (sixty) calendar days. It is worth emphasizing that the more up-to-date the version, the higher the chances of avoiding bugs and errors. Therefore, we recommend that updates be made as soon as possible. After this period, we will no longer provide technical support, and the client must update their SDK for us to assist in their cases.
We identify critical updates in the Release Notes with a tag just below the version, as shown in the example below:
Critical Update
These periods apply to all Unico clients, regardless of the capacity used.
You can follow the standard update or installation process described for the version you are using: Web, iOS, Android, and Flutter.
API contract breaks are restricted only to Major version releases (learn more about semantic versioning here). This means that significant changes in the API contract can only occur with major changes in the SDK, not in minor revisions. We have a practice of avoiding any Major version breaks as much as possible since it impacts significant changes in integration with the client, which is not our goal. We will only do this in cases of extreme necessity and always with the objective of ensuring security in all operations.
Each version has its own release notes as per the links below, presenting new features or bug fixes / fraud blocks: Android, iOS, Flutter, and Web.
Whenever there is a new SDK version, the website https://unico-auto-1.gitbook.io/idcloud/sdks is updated. If you are a Unico client, you will receive an email with updates and information about the changes. If you are not receiving this, please contact your CSM.
For critical updates: We will send an email as soon as the new version is available, with reinforcement from the Customer Success team, informing the urgency of the matter and the 5 (five) calendar days for updating.
For non-critical updates: To avoid overloading client teams, we will send a monthly email summarizing non-critical updates, informing the main points of change and the 60 (sixty) calendar days for updating.
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.
In this section, you will find all the necessary information for using and integrating the Unico IDCloud platform SDK into your Android applications for selfie capture
This guide has been designed to help you quickly and easily implement the Android 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 Android Customization section.
Create an instance of the builder (generated through the IAcessoBioBuilder
interface), providing the relevant context and implementing the AcessoBioListener
class. The implementation of this class is straightforward and can be achieved with just a few lines of code. Simply instantiate the builder with the relevant context and override the callback methods with your application’s business logic:
Configure the environment that will be used to run the SDK. Use the enumerated environment that contains the following enumerates:
Environment.PROD
: for production environment;
Environment.UAT
: for approval environment.
See how to implement it in the example below:
Note that implementing the AcessoBioListener
class is largely about setting up callback methods. Each method is triggered in a specific SDK return scenario. Override the methods exemplified above with your application’s business logic.
onErrorAcessoBio(ErrorBio errorBio)
This method is invoked whenever any implementation error occurs using any SDK method. It receives an ErrorBio
parameter that contains error details. See the Error Handling section for more about ErrorBio
.
onUserClosedCameraManually()
This method is invoked when the user manually closes the camera, such as by clicking the "Back" button.
onSystemClosedCameraTimeoutSession()
This method is invoked when the maximum session time is reached (without capturing an image).
You can configure the session timeout in seconds using setTimeoutSession
. The default and minimum timeout is 40 seconds.
onSystemChangedTypeCameraTimeoutFaceInference()
This method is invoked when the maximum time for face detection is reached without detection.
The maximum time is 13 seconds. The mode is then switched to manual capture to facilitate the user’s action.
All the above methods must be created as indicated in your project (even without any logic); otherwise, the project won’t compile successfully.
The SDK is preconfigured with intelligent framing and automatic capture. Configure the camera mode in the builder as follows:
The false/true
values in the above methods do not alter the capture experience; they are solely used for the SDK's internal logic.
Implement these listener methods using an instance of the iAcessoBioSelfie
class
The camera opening method, which is called in the next step, needs to know what to do when an image is successfully captured or if an error occurs in the process. You must specify "what to do" in the camera opening method by implementing listeners, which are triggered in success or error situations.
Through listener configuration, you can define what happens in your app in cases of an error (onErrorSelfie
method) or success (onSuccessSelfie
method) when capturing images.
To configure the listeners, you need to implement:
onSucessSelfie
MethodUpon successful image capture, this method returns a ResultCamera
object for subsequent API requests:
The ResultCamera
object provides two attributes: base64
and encrypted
:
Use base64
for preview in the app;
Use encrypted
for sending to REST APIs.
The encrypted
attribute is strictly intended for sending the image through the by Client APIs. It should not be opened or serialized, as its characteristics may change without prior notice. Its use must be exclusive to interactions with the APIs to ensure the integrity and security of the data. Unico is not responsible for any damages arising from this practice, as modifications may occur unexpectedly.
The base64
and encrypted
files can vary in size due to several factors, including the quality of the devices and the photos generated, as well as Unico's business rules. To avoid issues in your application, do not restrict the size of the string generated by the SDK for these files in your programming logic or infrastructure.
If it is necessary to convert the base64 string to a bitmap, the standard method does not work for Android. You need to perform a split at the comma (,) for it to function correctly. If you want to learn more, read the article: How to convert a Base64 string into a Bitmap image to show it in a ImageView?.
onErrorSelfie
MethodIf an error occurs during image capture, this method returns an ErrorBio
object
Learn more about ErrorBio
types in the SDK Error Handling section.
The openCameraSelfie method is used to open the camera. This method receives as a parameter the implementation of the UnicoSelfie class and the JSON with the credentials, generated in the step above.
The following example illustrates the steps for configuring listeners and opening the camera:
After capturing images, the next step is to send the generated encrypted
image from the SDK to the Client APIs.
For security reasons, the interval between the generation of the encrypted data and the sending through one of the available flows must 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.
In this section, you will find all the necessary information for using and integrating the Unico IDCloud platform SDK into your iOS applications
In this section, you will find all the updates for the Unico IDCloud Android 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.
Update SDK and Server version of Liveness with interaction.
Update SDK and Server version of Liveness with interaction.
Update SDK and Server version of Liveness with interaction.
In this version, we updated the compileSdkVersion
to API 34, in compliance with Google Play policies.
Update SDK and Server version of Liveness with interaction.
Update SDK and Server version of Liveness with interaction.
SDK Update and Liveness Server Interaction;
Internal Improvements.
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.
In this section, you will find all the necessary information for handling errors from the Unico IDCloud SDK in your Android applications
ErrorBio
ObjectThis object is returned whenever an error occurs in the Android SDK.
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 Android SDK:
73001
Context invalid
73002
Did not grant permission to open camera
73003
The lest API is 21(LOLLIPOP)
73004
Could not find implementation interface callback iAcessoBioSelfie
73005
Could not find implementation interface callback iAcessoBioDocument
73006
Unable to open camera on emulators
73100
Unable to connect to internet
73200
Please inform the json file name
73202
Unable to parse json file
73300
Unable to get unico authentication object
73301
Unable to parse object
73302
Could not find the unico token
73303
Current host is not registered
73400
Could not initialize camera
73500
Unable to get session token, service response error
73501
Unable to parce object
73502
Could not get session token
73701
Could not find active liveness import
73702
Unable to initialize active liveness in production mode
73703
Unable to get active liveness session
73704
The user pressed the cancel button and did not complete the Session.
73705
The Session was not performed successfully and a FaceScan was not generated. In general, other statuses will be sent to the
73706
The camera access is prevented because either the user has explicitly denied permission or the user's device is configured to
73707
The Session was cancelled due to the app being terminated, put to sleep, an OS notification, or the app was placed in the
73708
The Session was cancelled because device is in landscape mode. The user experience of devices in these orientations is poor
73709
The Session was cancelled because device is in reverse portrait mode. The user experience of devices in these orientations is
73710
The Session was cancelled because the user was unable to complete a Session in the default allotted time or the timeout set
73712
The Session was cancelled due to memory pressure.
73712
The Session was cancelled because your App is not in production and requires a network connection.
73713
The Session was cancelled because your key needs to be validated again.
73714
The Session was cancelled because the developer-configured encryption key was not valid.
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,
73719
The Session cancelled because user pressed the Get Ready screen subtext message. Note: This functionality is not available by
73800
Could not build encrypted key
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.
In this section, you will find an overview of how the Unico IDCloud platform SDK operates
The Unico IDCloud platform SDKs aim to enhance the security of your business and your clients, allowing for customization of the user experience by applying your brand's visual identity. The SDKs abstract the complexity of manipulating the users' device cameras and capturing images (selfies and documents), making life easier for developers and reducing the time to deliver the final product. Other advantages include:
Liveness: The SDKs are used in conjunction with the Proof of Life capability to ensure that the user is alive at the time of the selfie capture.
Image Capture Accuracy: The SDKs feature tools that assist the user in obtaining biometrically valid photos, reducing image drop rates compared to captures made by standard device cameras. SmartFrames, which are "key elements" that automatically adjust to the user's silhouette and screen proportions, are added to enable better image capture.
Enhanced Security: The SDKs include encryption resources and security measures against image injection, as well as functionalities that prevent fraud adapted to different camera modes. Security layers work complementarily, both at the application level and regarding the data that is transmitted between the SDKs and the backend. The SDK also includes code obfuscation, emulator blocking, and application bundle verification.
Capturing images through the SDKs is just the first part of your journey. Therefore, it is extremely important to understand the basic concepts and functionality of the biometric engine APIs. For more information, see the REST API documentation for by Client.
SDK Updates
It is important to emphasize that for our solutions to function properly, with maximum security and stability, it is essential that the SDK is up to date. It is the client's responsibility to monitor and ensure that they are using the latest version of the SDK available on our servers. Unico is not responsible for issues arising from the lack of SDK updates in the client's operation. [Learn more about our SDK Update Policy here.]
The SDK (Client-side) is responsible for simplifying your integration with the Unico IDCloud platform, absorbing all the complexities of camera manipulation and image capture.
If the capture is successful, the SDK returns an object that should be sent to the biometric engine API, thus completing the biometric validation, as exemplified in the diagram below:
Through the SDK, the application requests a frame for capture (according to how the application was configured)
The application renders the frame for capture in a pre-established placeholder
The SDK captures the image, generating a JWT token that will be returned to the application
The application sends the JWT to its server
The server interacts with the biometric engine APIs to analyze the image (via the by Client REST APIs)
The servers return the response from the biometric engine, which must be sent back to the application
The application provides a response to the user
Below are the necessary information and requirements officially supported by each Unico Client SDK:
Plugins: Flutter
Linguagens: Java/Kotlin
Xcode: >= 15.0
Plugins: Flutter
Linguagens: swift/objective-c
iOS: >= 11
Dependency manager: Cocoapods ou Swift Package Manager
Frameworks: React JS, Angular, Next JS, Vue JS e JS Vanilla.
Versão Javascript: ECMAScript 5 or higher.
Our support is restricted to applications developed directly on the native Android and iOS platforms, using their respective native modules, as well as the Flutter framework (if the implementation uses our plugin). At this time, we do not offer support for applications developed using hybrid frameworks such as React Native, Ionic, or other cross-platform development technologies.
The SDKs of the Unico IDCloud platform follow semantic versioning, which means there is a version number in the format "MAJOR.MINOR.PATCH," described as follows:
Major Version (MAJOR): When making incompatible changes to the API;
Minor Version (MINOR): When adding functionality while maintaining compatibility;
Patch Version (PATCH): When fixing bugs while maintaining compatibility.
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.
In this section, you will find all the information needed to install the Unico IDCloud platform SDK in your Android applications
Ensure your development environment meets the following preconditions:
Android SDK version 21 or higher;
Unico's Maven repository configured.
The capture component provided through the Android SDK supports versions equal to or higher for the following technologies:
Android: 5.0 (API 21);
Kotlin: 1.6.
This SDK does not function on emulators, it is only supported on physical devices.
The Android SDK is compatible with the vast majority of devices running Android 5.0 (API level 21) or higher.
The table below lists the devices tested in our lab, along with the availability of vendor/manufacturer extensions. Some listed extensions may be subject to specific manufacturer APIs or SKUs. Click below to view the tested devices:
ASUS - X01BDA
10.0.0
Físico
ASUS - Z01KD
8.0.1
Físico
HUAWEY - P30 Lite
9.0.0
Físico
LG - K22
10.0.0
Físico
LG - Q6
7.0.0
Físico
MOTOROLA - Moto one macro
10.0.0
Físico
MOTOROLA - Moto G4
6.0.1
Físico
MOTOROLA - Moto G5s Plus
8.1.0
Físico
MOTOROLA - Moto G6 Play
9.0.0
Físico
MOTOROLA - Moto G7 Play
10.0.0
Físico
MOTOROLA - Moto G7 Power
10.0.0
Físico
MOTOROLA - Moto G8 Power Lite
10.0.0
Físico
SAMSUNG - A01
10.0.0
Físico
SAMSUNG - J8 SM J810M
8.1.0
Físico
SAMSUNG - Galaxy A30s SM-A307GT
10.0.0
Físico
SAMSUNG - Galaxy A51
10.0.0
Físico
SAMSUNG - Galaxy A71
11.0.0
Físico
SAMSUNG - Galaxy S20+
11.0.0
Físico
SAMSUNG - s10e
11.0.0
Físico
XIAOMI - Mi 8 Lite
9.0.0
Físico
XIAOMI - Mi 8 Lite
10.0.0
Físico
XIAOMI - Poco X3
10.0.0
Físico
XIAOMI - Redmi Note 8
10.0.0
Físico
XIAOMI - Redmi Note 8 Pro
10.0.0
Físico
XIAOMI - Redmi Note 9
10.0.0
Físico
XIAOMI - Redmi Note 9 Pro
10.0.0
Físico
GOOGLE - Pixel sailfish
8.0.0
Virtual (TestLab)
HUAWEY - ALE L23
5.0.0
Virtual (TestLab)
HUAWEY - ANE LX1
9.0.0
Virtual (TestLab)
HUAWEY - ANE LX2
9.0.0
Virtual (TestLab)
HUAWEY - COR L29
8.1.0
Virtual (TestLab)
HUAWEY - MHA L29
7.0.0
Virtual (TestLab)
HUAWEY - NEO L29
9.0.0
Virtual (TestLab)
SAMSUNG - SC 02J
8.0.0
Virtual (TestLab)
SAMSUNG - SM G891A
9.0.0
Virtual (TestLab)
SAMSUNG - SM G930AZ
8.0.0
Virtual (TestLab)
SAMSUNG - SM G935A
8.0.0
Virtual (TestLab)
SAMSUNG - SM G965N
9.0.0
Virtual (TestLab)
SAMSUNG - SM G965U1
8.0.0
Virtual (TestLab)
SAMSUNG - SM G981U1
10.0.0
Virtual (TestLab)
SAMSUNG - SM J727V
8.1.0
Virtual (TestLab)
SAMSUNG - SM N950F
9.0.0
Virtual (TestLab)
SAMSUNG - SM N950N
9.0.0
Virtual (TestLab)
SAMSUNG - SM N950U
8.0.0
Virtual (TestLab)
SAMSUNG - SM N960F
9.0.0
Virtual (TestLab)
SAMSUNG - SM N960N
9.0.0
Virtual (TestLab)
SAMSUNG - SM N960U1
8.1.0
stLab)
To implement the Unico IDCloud platform’s Android SDK in your Android app, follow the steps below:
The Android SDK is available via a Maven repository. Add it to the repositories
block in the root-level build.gradle
file:
Enable AndroidX support in your gradle.properties
file in the root of your project. This ensures better performance and proper functioning of the capture framework.
After configuring the Android SDK, import it into your project by adding acessobio-android
to the dependencies
block in app/build.gradle
.
Use the module-specific build.gradle
file, not the project-level one:
If you encounter the error:
Invoke-customs are only supported starting with android 0 --min-api 26
Add the following lines to the compileOptions
block in app/build.gradle
:
Contact the CSs and/or Onboarding team.
Request the SDK Key by entering 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 receive your SDK Key to implement the AccessBioConfigDataSource.
Once the SDK installation is complete, proceed to the implementation by reading the following Usage and Integration Guide:
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.
In this section, you will find all the information needed to install the Unico IDCloud platform SDK in your iOS applications
Ensure your development environment meets the following preconditions:
iOS SDK version 11 or later;
PocoaPods or Swift Package Manager dependency manager configured.
The capture component provided by the iOS SDK is compatible with all devices running iOS 11 or later. You can check the list of compatible devices on Apple’s official support channels.
To integrate the Unico IDCloud iOS SDK into your iOS app, follow the steps below:
CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, refer to the official CocoaPods documentation. To integrate the iOS SDK into your Xcode project with CocoaPods, follow these steps:
Add unicocheck-ios
to your Podfile:
Run the following command in your terminal to install the dependencies:
If you are running the project in .xcodeproj
, you must open it in .xcworkspace
.
Swift Package Manager is a dependency manager for Swift projects. It integrates with the Swift build system to automate the downloading, compiling, and linking of dependencies. To integrate the iOS SDK into your project with SPM, follow these steps:
Add the dependency to your Package.swift
file:
Contact the CSs and/or Onboarding team.
Request the SDK Key by entering 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 receive your SDK Key to implement the AccessBioConfigDataSource.
Once the SDK installation is complete, proceed to the implementation by reading the following Usage and Integration Guide:
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.
In this section, you will find all the information necessary for customizing the SDK of the Unico IDCloud platform in your Android applications
The Android SDK allows for some customizations to be made. Below are all the possible customizations for this SDK.
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:
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.
This is an optional step, but it is highly recommended to give the capture process the visual identity of your company.
You can customize some objects in the frame according to the camera mode used through the setTheme()
method.
The supported types for color representation are Color Resource or a String containing the hexadecimal color code. E.g., R.color.red
or #FF0000
.
All methods are available below:
It is also possible to make static customizations. In your colors.xml
file, add the following code:
Below, check the specification of the customization fields:
This is an optional step, but it is highly recommended to give the capture process the visual identity of your company.
You can customize some objects in the frame according to the camera mode used through the setTheme()
method.
The supported types for color representation are Color Resource or a String containing the hexadecimal color code. E.g., R.color.red
or #FF0000
.
All methods are available below:
It is also possible to make static customizations. In your colors.xml
file, add the following code:
Below, check the specification of the customization fields:
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.
In this section, you will find solutions to some common issues encountered during the integration of the Unico IDCloud SDK into your iOS applications
The obfuscation guide aims to help developers handle obfuscation issues in their applications. The client's obfuscator may affect the SDK's functionality, and it is necessary that it does not obfuscate the SDK's code. Unico is not responsible for any obfuscation conflicts with the SDK.
Obfuscation is the process of transforming bytecode into a less human-readable form, thus making reverse engineering more difficult. This process involves removing debug information, such as variable tables and line numbers, and renaming packages, classes, and methods. When embedding the Android SDK in an application, errors may occur.
When using the iXGuard tool for obfuscation, we recommend version 4.11.0 or later.
The responsibility for flow control is delegated to the caller of the SDK. Therefore, if a shadow appears or the screen does not close after successful capture, it is suggested to implement a way to release this screen. The release may vary according to the implemented navigation stack. To implement this, add the release method preferably within the delegate method onSuccessSelfie
. Here are some release examples that can be used:
After the official release of Xcode 16 on September 17, 2024, we identified an issue when using the SDK on the App Store that flags the use of bitcode in two internal dependencies when using CocoaPods as the dependency manager. These are DeviceProfiling
and UnicoSdkLogger
. To avoid blocking new releases, you can follow the steps below until a permanent fix is provided in a future SDK release:
Open the Podfile
file.
Add the following lines after the post_install
command (do |installer|
) and before the last end
:
2.1. If there is existing code, insert this snippet before it;
2.2. f bitcode removal is already done manually, explicitly add the paths listed in framework_paths
;
If there is no post_install do |installer|
command in the Podfile
, add it as follows before the last end
:
In this section, you will find all the necessary information for using and integrating the Unico IDCloud platform SDK into your iOS applications for selfie capture
This guide has been designed to help you quickly and easily implement the Android 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 iOS Customization section.
To get started with the Unico Check iOS SDK, import the SDK and implement the AcessoBioManagerDelegate
interface within the ViewController
you want to use. The implementation of this class is straightforward and can be done with just a few lines of code.
All you need to do is instantiate the builder with the relevant context and override the callback methods with your application’s business logic:
Configure the environment that will be used to run the SDK. Use the enumerated environment that contains the following enumerates:
PROD
: for production environment;
UAT
: for approval environment.
See how to implement it in the example below:
As shown in the previous example, the main task when implementing the AcessoBioManagerDelegate
interface is configuring the callback methods. Each method is called in response to a specific return from the SDK.
Simply override the methods illustrated in the previous step with your application’s business logic:
onErrorAcessoBioManager(_ error: ErrorBio!)
This method is invoked whenever any implementation error occurs using any SDK method. It receives an ErrorBio
parameter that contains error details. See the Error Handling section for more about ErrorBio
.
onUserClosedCameraManually()
This method is invoked when the user manually closes the camera, such as by clicking the "Back" button.
onSystemClosedCameraTimeoutSession()
This method is invoked when the maximum session time is reached (without capturing an image).
You can configure the session timeout in seconds using setTimeoutSession
. The default and minimum timeout is 40 seconds.
onSystemChangedTypeCameraTimeoutFaceInference()
This method is invoked when the maximum time for face detection is reached without detection.
The maximum time is 13 seconds. The mode is then switched to manual capture to facilitate the user’s action.
All the above methods must be created as indicated in your project (even without any logic); otherwise, the project won’t compile successfully.
The SDK is preconfigured with intelligent framing and automatic capture. Configure the camera mode in the builder as follows:
The false/true
values in the above methods do not alter the capture experience; they are solely used for the SDK's internal logic.
The camera launch method needs to know how to handle situations when an image is successfully captured or when an error occurs during the process. The handling instructions are passed to the camera launch method by setting delegates, which are called in cases of success or error.
Through delegate configuration, you can specify what actions your app should take in the event of an error (using the onErrorSelfie
method) or success (using the onSuccessSelfie
method) in capturing images.
To set up the delegates, you must implement the SelfieCameraDelegate
and AcessoBioSelfieDelegate
interfaces:
onSuccessSelfie
MethodUpon successful image capture, this method returns a SelfieResult
object for subsequent API requests:
The SelfieResult
object provides two attributes: base64
and encrypted
:
Use base64
for preview in the app;
Use encrypted
for sending to REST APIs.
The encrypted
attribute is strictly intended for sending the image through the by Client APIs. It should not be opened or serialized, as its characteristics may change without prior notice. Its use must be exclusive to interactions with the APIs to ensure the integrity and security of the data. Unico is not responsible for any damages arising from this practice, as modifications may occur unexpectedly.
The base64
and encrypted
files can vary in size due to several factors, including the quality of the devices and the photos generated, as well as Unico's business rules. To avoid issues in your application, do not restrict the size of the string generated by the SDK for these files in your programming logic or infrastructure.
onErrorSelfie
MethodIf an error occurs during image capture, this method returns an ErrorBio
object:
Learn more about ErrorBio
types in the SDK Error Handling section.
If not configured, the SDK will use the environment set in the configuration file (getHostKey
). If getHostKey
is not being used, an error will be returned.
You can configure the environment to be used during SDK execution by using the EnvironmentEnum
enumeration, which contains the following options:
EnvironmentEnum.PROD
: for the Production environment
EnvironmentEnum.UAT
: for the Testing (UAT) environment
See the implementation example below:
To proceed with opening the camera, you must first prepare it using the prepareSelfieCamera
method. This method takes two parameters: the implementation of the SelfieCameraDelegate
class and the JSON with the credentials generated in the previous step.
When the camera is prepared, the onCameraReady
event is triggered, receiving an object of type AcessoBioCameraOpenerDelegate
as a parameter. You should override this method to open the camera using the object received through the open()
method:
The ErrorPrepare
type is an extension of ErrorBio
, containing all of its properties. Learn more about the ErrorBio
type in the SDK error handling section.
If an error occurs while preparing the camera, the onCameraFailed
event is triggered. You should implement this method according to your app's business logic.
After capturing images, the next step is to send the generated encrypted
image from the SDK to the Client APIs.
For security reasons, the interval between the generation of the encrypted data and the sending through one of the available flows must be no more than 10 minutes. Submissions made beyond this period will be automatically rejected by the API.
In this section, you will find all the updates for the Unico IDCloud iOS SDK
Keep your iOS 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.
SDK Update and Liveness Server Interaction.
Starting with Xcode 15, Apple has dropped support for iOS 11. Unico will discontinue support for iOS 11 in the Unico Check iOS SDK in a future version.
SDK Update and Liveness Server Interaction.
Starting with Xcode 15, Apple has dropped support for iOS 11. Unico will discontinue support for iOS 11 in the Unico Check iOS SDK in a future version.
SDK Update and Liveness Server Interaction.
Starting with Xcode 15, Apple has dropped support for iOS 11. Unico will discontinue support for iOS 11 in the Unico Check iOS SDK in a future version.
SDK Update and Liveness Server Interaction.
Starting with Xcode 15, Apple has dropped support for iOS 11. Unico will discontinue support for iOS 11 in the Unico Check iOS SDK in a future version.
SDK Update and Liveness Server Interaction.
Starting with Xcode 15, Apple has dropped support for iOS 11. Unico will discontinue support for iOS 11 in the Unico Check iOS SDK in a future version.
In this section, you will find all the information necessary for customizing the SDK of the Unico IDCloud platform in your Android applications
The Android SDK allows for some customizations to be made. Below are all the possible customizations for this SDK.
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:
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.
This is an optional step, but it is highly recommended to give the capture process the visual identity of your company. You can customize some objects in the frame according to the camera mode used through the setTheme()
method.
Os tipos suportados para representação de cor são Color Resource ou String contendo o código hexadecimal da cor. Ex: R.color.red ou #FF0000.
All methods are available below:
Here are some examples of how you can use the above methods in your project:
In this section, you will find solutions to some common issues encountered during the integration of the Unico IDCloud SDK into your Android applications
The obfuscation material aims to assist developers in navigating obfuscation issues in their applications. The client's obfuscator can affect the SDK's functionality; therefore, it is essential that it does not obfuscate the SDK code. Unico disclaims any responsibility regarding obfuscation conflicts with the SDK.
Obfuscation is a process of transforming bytecode into a form that is less readable to humans, thereby making reverse engineering more difficult. This process involves removing debugging-related information such as variable tables, line numbers, and renaming packages, classes, and methods. When integrating the Android SDK into an application, failures may occur.
When obfuscation is performed using DexGuard, if a failure occurs, use the following rules:
When obfuscation is performed using ProGuard, if a failure occurs, use the following rules:
Starting from version 4.4.x of the SDK, Unico began using its own Maven repository to distribute the Android SDK and changed the SDK dependency name, in addition to adjustments to ProGuard and DexGuard rules for clients using the GuardSquare library, as described in the Code Obfuscation section above.
Change the Maven repository to the new repository in the project’s build.gradle
file. The implementation was previously done as follows:
It should now be updated to the new repository:
Update the SDK dependency to the new dependency in the project’s app/build.gradle
file. The implementation was previously done as follows:
It should now be updated to the new dependency:
In this section, you will find all the necessary information for using and integrating the Unico IDCloud SDK into your Android applications for document capture
This guide has been designed to help you implement the Android 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 Android Customization section.
In this camera mode, there is a capture frame to assist the user in positioning the document correctly. Once the document is properly positioned, the user must click the button to take a photo of the document.
The SDK does not perform any validation of 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.
Create an instance of the builder (generated through the IAcessoBioBuilder
interface), providing the relevant context as a parameter and implementing the AcessoBioListener
class. The implementation of this class is quite simple and can be done with just a few lines of code. All you need to do is instantiate the builder, specifying the relevant context and overriding the callback methods with your application's business logic:
Note that the implementation of the AcessoBioListener
class largely consists of configuring the callback methods. Each method is called in a specific situation based on the SDK's return.
Override the methods exemplified above with your application’s business logic.
onErrorAcessoBio(ErrorBio errorBio)
This method is invoked with a parameter of type ErrorBio
that contains details about the error. Learn more about the ErrorBio
type in the error handling section.
onUserClosedCameraManually()
This method is invoked whenever the user manually closes the camera, such as by clicking the "Back" button.
onSystemClosedCameraTimeoutSession()
This method is invoked once the maximum session time is reached (without capturing any image).
You can configure the session timeout in seconds using setTimeoutSession
. The default and minimum timeout is 40 seconds.
onSystemChangedTypeCameraTimeoutFaceInference()
This method is invoked when the maximum time for face detection is reached without detection.
The maximum time is 13 seconds. The mode is then switched to manual capture to facilitate the user’s action.
All the above methods must be created as indicated in your project (even without any logic); otherwise, the project won’t compile successfully.
The implementation of these listener methods should be done through an instance of the iAcessoBioSelfie
class.
The camera opening method, which is called in the next step, needs to know what to do upon successfully capturing an image or encountering an error during the process. It is necessary to inform "what to do" to the camera opening method by implementing listeners that are called in success or error situations.
By configuring the listeners, you can specify what happens in your app in case of an error (method onErrorDocument
) or success (method onSuccessDocument
) in capturing images. The example below illustrates the configuration of the listeners, building, and opening the camera:
onSucessDocument
MethodWhen successfully capturing an image, this method is invoked and returns an object of type ResultCamera
, which is used later in the REST API requests:
The ResultCamera
object returns two attributes: base64
and encrypted
.
The base64
attribute can be used if you want to display a preview of the image in your app.
Both the encrypted
and base64
attributes can be sent in the REST API calls of the by Client.
If it is necessary to convert the base64 string to a bitmap, the standard method does not work for Android. You need to perform a split at the comma (,) for it to function correctly. If you want to learn more, read the article: How to convert a Base64 string into a Bitmap image to show it in a ImageView?.
onErrorDocument
MethodIf an error occurs during the image capture, this method is invoked and returns an object of type ErrorBio
:
Learn more about the types of ErrorBio
in the SDK's error handling section.
It is necessary to create an instance of the builder using the build()
method. This method is provided by the object generated with the IAcessoBioBuilder
interface and the AcessoBio
class:
The next step is to prepare the camera using the prepareDocumentCamera()
method with the object returned by the builder (named UnicoCheckCamera
in the example above). The prepareDocumentCamera()
method generates an object of type UnicoCheckCameraOpener.Document
, which is used to open the camera with its open()
method, receiving the type of document to be captured as a parameter:
DocumentCameraType.CPF
Capture the front of the CPF
DocumentCameraType.CNH
Capture the open CNH
DocumentCameraType.CNH_FRENTE
Capture the front of the CNH
DocumentCameraType.CNH_VERSO
Capture the back of the CNH
DocumentCameraType.RG_FRENTE
Capture the front of the RG
DocumentCameraType.RG_VERSO
Capture the back of the RG
DocumentCameraType.None
Capture any other document
If you need to capture a document for which there is no specific frame (e.g., RNE, among others), use the DocumentCameraType.None
frame, which will allow you to use a generic rectangular frame to guide any capture.
After capturing images, the next step is to send the generated base64
image from the SDK to the Client 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.
In this section, you will find all the necessary information for handling errors from the Unico IDCloud SDK in your Android applications
In this section, you will find all the necessary information for using and integrating the Unico IDCloud SDK into your iOS applications for document capture
This guide has been designed to help you quickly and easily implement the Android 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 iOS Customization section.
In this camera mode, there is a capture frame to assist the user in positioning the document correctly. After positioning the document correctly, the user must click the button to capture the photo of the document.
The SDK does not perform any type of validation on what is being captured.
In this camera mode, it is possible to capture the following documents:
RG: Capture of the RG (separate front and back).
CNH: Capture of the CNH opened.
CNH Front: Capture of the front of the CNH.
CNH Back: Capture of the back of the CNH.
CPF: Capture of the CPF document.
Without Silhouette: Capture of a generic document.
To get started with the Unico IDCloud iOS SDK, import the SDK and implement the AcessoBioManagerDelegate
interface in the ViewController
you wish to use. The implementation of this class is straightforward and can be done with just a few lines of code. All you need to do is instantiate the builder while providing the appropriate context and override the callback methods with the business logic of your application.
Note that, as in the previous example, the implementation work for the AcessoBioManagerDelegate
interface mainly involves configuring the callback methods. Each method is called in a specific situation based on the SDK's return status.
Override the methods exemplified above with your application’s business logic.
onErrorAcessoBioManager(_ error: ErrorBio!)
This method is invoked whenever any implementation error occurs using any SDK method. It receives an ErrorBio
parameter that contains error details. See the Error Handling section for more about ErrorBio
.
onUserClosedCameraManually()
This method is invoked when the user manually closes the camera, such as by clicking the "Back" button.
onSystemClosedCameraTimeoutSession()
This method is invoked when the maximum session time is reached (without capturing an image).
You can configure the session timeout in seconds using setTimeoutSession
. The default and minimum timeout is 40 seconds.
onSystemChangedTypeCameraTimeoutFaceInference()
This method is invoked when the maximum time for face detection is reached without detection.
The maximum time is 13 seconds. The mode is then switched to manual capture to facilitate the user’s action.
All the above methods must be created as indicated in your project (even without any logic); otherwise, the project won’t compile successfully.
The method to open the camera (which is called in the next step) needs to know what to do when an image is successfully captured or if there is an error in the process. You specify "what to do" to the camera opening method through the configuration of delegates that are invoked in success or error situations.
By configuring the delegates, you can define the behavior of your app in case of an error (using the onErrorDocument
method) or success (using the onSuccessDocument
method) during image capture.
To set up the delegates, you should implement the DocumentCameraDelegate
and AcessoBioDocumentDelegate
interfaces:
onSucessDocument
MethodWhen successfully capturing an image, this method is invoked and returns an object of type ResultCamera
, which is used later in the REST API requests:
The ResultCamera
object returns two attributes: base64
and encrypted
.
The base64
attribute can be used if you want to display a preview of the image in your app.
Both the encrypted
and base64
attributes can be sent in the REST API calls of the by Client.
onErrorDocument
If an error occurs during the image capture, this method is invoked and returns an object of type ErrorBio
:
Learn more about the types of ErrorBio
in the SDK's error handling section.
To open the camera, it is necessary to prepare it using the prepareDocumentCamera
method. This method takes as parameters the implementation of the DocumentCameraDelegate
class and the JSON with the credentials, generated in the previous step.
When the camera is ready, the onCameraReadyDocument
event is triggered, which receives a parameter of type AcessoBioCameraOpenerDelegate
. You should override this method to open the camera using the object received through the openDocument()
method, receiving the parameters for the type of document to be captured, which are:
If you need to capture a document for which there is no specific frame (e.g., RNE, among others), use the DocumentEnums.none
frame, which will allow you to use a generic rectangular frame to guide any capture.
The delegates implemented above (described here as Self):
The ErrorPrepare
type is an extension of ErrorBio
, thus containing all its properties. Learn more about the ErrorBio
type in the error handling section of the SDK.
If an error occurs while preparing the camera, the onCameraFailedDocument
event is triggered. You should implement this method according to your app's business logic. In case of success, the onSuccessDocument
event is triggered, as explained in the section above.
After capturing images, the next step is to send the generated base64
image from the SDK to the Client APIs.
Android: 5.0 (API 21)
Kotlin: 1.6
version 9 or higher installed (the official development IDE from Google);
version 15.0.1 or later (Apple’s official IDE);
Source: , , .
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 .
If it is necessary to convert the base64 string to a bitmap, the standard method does not work for Android. You need to perform a split at the comma (,) for it to function correctly. If you want to learn more, read the article:.
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 .
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 .
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 .
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 .
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 .
If it is necessary to convert the base64 string to a bitmap, the standard method does not work for Android. You need to perform a split at the comma (,) for it to function correctly. If you want to learn more, read the article:.
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 .
DocumentEnums.CPF
Capture the front of the CPF
DocumentEnums.CNH
Capture the open CNH
DocumentEnums.cnhFrente
Capture the front of the CNH
DocumentEnums.cnhVerso
Capture the back of the CNH
DocumentEnums.RG
Capture the open RG
DocumentEnums.rgFrente
Capture the front of the RG
DocumentEnums.rgVerso
Capture the back of the RGo RG
DocumentEnums.none
Capture any other document
getColorSilhouetteSuccess()
getColorSilhouetteError()
getColorBackground()
getColorBoxMessage()
getColorTextMessage()
getColorTextPopupError()
getColorBackgroundPopupError()
getColorBackgroundButtonPopupError()
getColorTextButtonPopupError()
getColorBackgroundTakePictureButton()
getColorIconTakePictureButton()
getColorBackgroundBottomDocument()
getColorTextBottomDocument()
getImageIconPopupError()
getProgressBarColor()
(opcional)
getCancelButtonIconColor()
(opcional)
getCode()
Method used to obtain the error code that occurred.
getDescription()
Method used to obtain the description of the error that occurred.
73000
The Session was cancelled because of an unknown and unexpected error. The Unico Check 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.
73001
Context invalid
73003
The API version needs to be 11 or newer.
73006
Unable to open camera on emulators
73100
Unable to connect to internet
73200
Could not find the unico_sdk json file
73202
Unable to load unico_sdk json file
73203
Unable to load AcessoBioConfigDataSource
73204
Unable to initialize the SDK, please configure the environment on setEnviroment method of build.
73300
Unable to get unico authentication object
73301
Unable to parse unico authentication object
73302
Could not find the unico token
73701
Could not find active liveness import
73702
Unable to initialize active liveness in production mode
73703
Unable to get active liveness session
73704
The user pressed the cancel button and did not complete the Session.
73705
The Session was not performed successfully and a FaceScan was not generated. In general, other statuses will be sent to the developer for specific unsuccess reasons.
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 cancelled 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 the device is in landscape mode. The user experience of devices in these orientations is poor and thus portrait is required.
73709
The Session was cancelled because the device is in reverse portrait 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.
73711
The Session was cancelled due to memory pressure.
73712
The Session was cancelled because your App is not in production and requires a network connection.
73713
The Session was cancelled because your key needs to be validated again.
73714
The Session was cancelled because the developer-configured encryption key was not valid.
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.
73719
The Session was cancelled because the user pressed the Get Ready screen subtext message. Note: This functionality is not available by default, and must be requested from FaceTec in order to enable it.
73720
The Session was not processed.
73721
The Session can't be performed: attempts limit exceeded.
73722
The Session can't be performed: face alignment timeout.
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.
73800
Could not build encrypted key
In this section, you will find all the necessary information for using and integrating the Unico IDCloud platform SDK into your Flutter applications for selfie capture
This guide has been designed to help you quickly and easily implement the Flutter 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 Flutter Customization section.
To get started, create an instance of the builder (generated through the UnicoCheckBuilder interface) by providing the relevant context and the implementation of the UnicoListener class as parameters. The implementation of this class is quite simple and can be done in just a few lines of code. All you need to do is override the callback methods with the business logic of your application.
Configure the environment that will be used to run the SDK. Use the enumerated environment that contains the following enumerates:
UnicoEnvironment.PROD
: for production environment;
UnicoEnvironment.UAT
: for approval environment.
See how to implement it in the example below:
Note that implementing the AcessoBioListener
class is largely about setting up callback methods. Each method is triggered in a specific SDK return scenario. Override the methods exemplified above with your application’s business logic.
onErrorUnico(UnicoError error)
This method is invoked whenever any implementation error occurs using any SDK method. It receives an ErrorBio
parameter that contains error details. See the Error Handling section for more about ErrorBio
.
onUserClosedCameraManually()
This method is invoked when the user manually closes the camera, such as by clicking the "Back" button.
onSystemClosedCameraTimeoutSession()
This method is invoked when the maximum session time is reached (without capturing an image).
You can configure the session timeout in seconds using setTimeoutSession
. The default and minimum timeout is 40 seconds.
onSystemChangedTypeCameraTimeoutFaceInference()
This method is invoked when the maximum time for face detection is reached without detection.
The maximum time is 13 seconds. The mode is then switched to manual capture to facilitate the user’s action.
All the above methods must be created as indicated in your project (even without any logic); otherwise, the project won’t compile successfully.
The SDK is preconfigured with intelligent framing and automatic capture. Configure the camera mode in the builder as follows:
The false/true
values in the above methods do not alter the capture experience; they are solely used for the SDK's internal logic.
mplement these listener methods using an instance of the UnicoSelfie
class.
The camera opening method, which is called in the next step, needs to know what to do when an image is successfully captured or if an error occurs in the process. You must specify "what to do" in the camera opening method by implementing listeners, which are triggered in success or error situations.
Through listener configuration, you can define what happens in your app in cases of an error (onErrorSelfie
method) or success (onSuccessSelfie
method) when capturing images.
onSucessSelfie
MethodUpon successful image capture, this method returns a ResultCamera
object for subsequent API requests:
The ResultCamera
object provides two attributes: base64
and encrypted
:
Use base64
for preview in the app;
Use encrypted
for sending to REST APIs.
The encrypted
attribute is strictly intended for sending the image through the by Client APIs. It should not be opened or serialized, as its characteristics may change without prior notice. Its use must be exclusive to interactions with the APIs to ensure the integrity and security of the data. Unico is not responsible for any damages arising from this practice, as modifications may occur unexpectedly.
The base64
and encrypted
files can vary in size due to several factors, including the quality of the devices and the photos generated, as well as Unico's business rules. To avoid issues in your application, do not restrict the size of the string generated by the SDK for these files in your programming logic or infrastructure.
If it is necessary to convert the base64 string to a bitmap, the standard method does not work for Android. You need to perform a split at the comma (,) for it to function correctly. If you want to learn more, read the article:How to convert a Base64 string into a Bitmap image to show it in a ImageView?.
onErrorSelfie
MethodIf an error occurs during image capture, this method returns an UnicoError
object:
Learn more about ErrorBio
types in the SDK Error Handling section.
The openCameraSelfie
method is used to open the camera. This method takes as parameters the implementation of the UnicoSelfie
class and the JSON with the credentials generated in the previous step. The following example illustrates the steps for configuring the listeners and opening the camera:
After capturing images, the next step is to send the generated encrypted
image from the SDK to the Client APIs.
For security reasons, the interval between the generation of the encrypted data and the sending through one of the available flows must 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.
In this section, you will find all the information necessary for customizing the SDK of the Unico IDCloud platform in your Flutter applications
The Flutter SDK allows for some customizations to be made. Below are all the possible customizations for this SDK.
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:
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.
This is an optional step, but it is highly recommended to give the capture process the visual identity of your company. You can customize some objects in the frame according to the camera mode used through the setTheme()
method.
The supported types for color representation are Color Resource or a String containing the hexadecimal color code. E.g., R.color.red
or #FF0000
.
All methods are available below:
getColorSilhouetteError()
getColorSilhouetteNeutral()
getColorBackground()
getColorBoxMessage()
getColorTextMessage()
getColorBackgroundPopupError()
getColorBackgroundButtonPopupErrorgetColorTextPopupError()
getColorBackgroundButtonPopupError()
getColorTextButtonPopupError()
getColorBackgroundTakePictureButton()
getColorIconTakePictureButton()
getColorBackgroundBottomDocument()
getColorTextBottomDocument()
getColorProgressBar()
getColorCancelButtonIcon()
In the Android implementation, the customization of the colorCancelButtonIcon must be done by adding the desired color in the colors.xml resource file.
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.
In this section, you will find all the necessary information for handling errors from the Unico IDCloud SDK in your Android applications
UnicoError
ObjectThis object is returned whenever an error occurs in the Flutter SDK.
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 Flutter SDK:
73001
Context invalid
73002
Did not grant permission to open camera
73003
The lest API is 21(LOLLIPOP)
73004
Could not find implementation interface callback iAcessoBioSelfie
73005
Could not find implementation interface callback iAcessoBioDocument
73006
Unable to open camera on emulators
73100
Unable to connect to internet
73200
Please inform the json file name
73202
Unable to parse json file
73300
Unable to get unico authentication object
73301
Unable to parse object
73302
Could not find the unico token
73303
Current host is not registered
73400
Could not initialize camera
73500
Unable to get session token, service response error
73501
Unable to parce object
73502
Could not get session token
73701
Could not find active liveness import
73702
Unable to initialize active liveness in production mode
73703
Unable to get active liveness session
73704
The user pressed the cancel button and did not complete the Session.
73705
The Session was not performed successfully and a FaceScan was not generated. In general, other statuses will be sent to the
73706
The camera access is prevented because either the user has explicitly denied permission or the user's device is configured to
73707
The Session was cancelled due to the app being terminated, put to sleep, an OS notification, or the app was placed in the
73708
The Session was cancelled because device is in landscape mode. The user experience of devices in these orientations is poor
73709
The Session was cancelled because device is in reverse portrait mode. The user experience of devices in these orientations is
73710
The Session was cancelled because the user was unable to complete a Session in the default allotted time or the timeout set
73712
The Session was cancelled due to memory pressure.
73712
The Session was cancelled because your App is not in production and requires a network connection.
73713
The Session was cancelled because your key needs to be validated again.
73714
The Session was cancelled because the developer-configured encryption key was not valid.
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,
73719
The Session cancelled because user pressed the Get Ready screen subtext message. Note: This functionality is not available by
73800
Could not build encrypted key
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.
In this section, you will find all the necessary information for using and integrating the Unico IDCloud platform SDK into your Flutter applications
In this section, you will find all the updates for the Unico IDCloud Flutter 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.
Native SDK Update:
Android version 5.29.0
release notes;
iOS version 2.16.8
release notes.
Native SDK Update:
Android version 5.28.0
release notes;
iOS version 2.16.7
release notes.
Native SDK Update:
Android version 5.27.0
release notes;
iOS version 2.16.5
release notes.
Native SDK Update:
Android version 5.25.0
release notes.
Native SDK Update:
Android version 5.24.0
release notes;
iOS version 2.16.4
release notes.
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.
In this section, you will find all the necessary information for using and integrating the Unico IDCloud platform SDK into your Webapplications
In this section, you will find solutions to some common issues encountered during the integration of the Unico IDCloud SDK into your Flutter applications
The obfuscation guide aims to help developers handle obfuscation issues in their applications. The client's obfuscator may affect the SDK's functionality, and it is necessary that it does not obfuscate the SDK's code. Unico is not responsible for any obfuscation conflicts with the SDK.
Obfuscation is the process of transforming bytecode into a less human-readable form, thus making reverse engineering more difficult. This process involves removing debug information, such as variable tables and line numbers, and renaming packages, classes, and methods. When embedding the Android SDK in an application, errors may occur.
When obfuscation is performed using DexGuard, if a failure occurs, use the following rules:
When obfuscation is performed using ProGuard, if a failure occurs, use the following rules:
After the official release of Xcode 16 on September 17, 2024, we identified an issue when using the SDK on the App Store that flags the use of bitcode in two internal dependencies when using CocoaPods as the dependency manager. These are DeviceProfiling
and UnicoSdkLogger
. To avoid blocking new releases, you can follow the steps below until a permanent fix is provided in a future SDK release:
Open the Podfile
file.
Add the following lines after the post_install
command (do |installer|
) and before the last end
:
2.1. If there is existing code, insert this snippet before it;
2.2. f bitcode removal is already done manually, explicitly add the paths listed in framework_paths
;
If there is no post_install do |installer|
command in the Podfile
, add it as follows before the last end
:
Source: Bitrise, Xcode 16 release notes, Stackoverflow.
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.
In this section, you will find all the information needed to install the Unico IDCloud platform SDK in your Flutter applications
Ensure your development environment meets the following preconditions:
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.
This SDK does not function on emulators, it is only supported on physical devices.
iOS: It is compatible with almost all devices running iOS 11.
You can check the list of these devices on Apple's official support channels.
It is compatible with the vast majority of devices running Android 5.0 (API level 21) or higher.
The table below lists the devices tested in the lab, along with the availability of vendor/manufacturer extensions. Some listed extensions may be subject to specific manufacturer APIs or SKUs. Click below to view the tested devices:
ASUS - X01BDA
10.0.0
Físico
ASUS - Z01KD
8.0.1
Físico
HUAWEY - P30 Lite
9.0.0
Físico
LG - K22
10.0.0
Físico
LG - Q6
7.0.0
Físico
MOTOROLA - Moto one macro
10.0.0
Físico
MOTOROLA - Moto G4
6.0.1
Físico
MOTOROLA - Moto G5s Plus
8.1.0
Físico
MOTOROLA - Moto G6 Play
9.0.0
Físico
MOTOROLA - Moto G7 Play
10.0.0
Físico
MOTOROLA - Moto G7 Power
10.0.0
Físico
MOTOROLA - Moto G8 Power Lite
10.0.0
Físico
SAMSUNG - A01
10.0.0
Físico
SAMSUNG - J8 SM J810M
8.1.0
Físico
SAMSUNG - Galaxy A30s SM-A307GT
10.0.0
Físico
SAMSUNG - Galaxy A51
10.0.0
Físico
SAMSUNG - Galaxy A71
11.0.0
Físico
SAMSUNG - Galaxy S20+
11.0.0
Físico
SAMSUNG - s10e
11.0.0
Físico
XIAOMI - Mi 8 Lite
9.0.0
Físico
XIAOMI - Mi 8 Lite
10.0.0
Físico
XIAOMI - Poco X3
10.0.0
Físico
XIAOMI - Redmi Note 8
10.0.0
Físico
XIAOMI - Redmi Note 8 Pro
10.0.0
Físico
XIAOMI - Redmi Note 9
10.0.0
Físico
XIAOMI - Redmi Note 9 Pro
10.0.0
Físico
GOOGLE - Pixel sailfish
8.0.0
Virtual (TestLab)
HUAWEY - ALE L23
5.0.0
Virtual (TestLab)
HUAWEY - ANE LX1
9.0.0
Virtual (TestLab)
HUAWEY - ANE LX2
9.0.0
Virtual (TestLab)
HUAWEY - COR L29
8.1.0
Virtual (TestLab)
HUAWEY - MHA L29
7.0.0
Virtual (TestLab)
HUAWEY - NEO L29
9.0.0
Virtual (TestLab)
SAMSUNG - SC 02J
8.0.0
Virtual (TestLab)
SAMSUNG - SM G891A
9.0.0
Virtual (TestLab)
SAMSUNG - SM G930AZ
8.0.0
Virtual (TestLab)
SAMSUNG - SM G935A
8.0.0
Virtual (TestLab)
SAMSUNG - SM G965N
9.0.0
Virtual (TestLab)
SAMSUNG - SM G965U1
8.0.0
Virtual (TestLab)
SAMSUNG - SM G981U1
10.0.0
Virtual (TestLab)
SAMSUNG - SM J727V
8.1.0
Virtual (TestLab)
SAMSUNG - SM N950F
9.0.0
Virtual (TestLab)
SAMSUNG - SM N950N
9.0.0
Virtual (TestLab)
SAMSUNG - SM N950U
8.0.0
Virtual (TestLab)
SAMSUNG - SM N960F
9.0.0
Virtual (TestLab)
SAMSUNG - SM N960N
9.0.0
Virtual (TestLab)
SAMSUNG - SM N960U1
8.1.0
stLab)
To implement the Unico IDCloud Flutter SDK in your Flutter application, follow the step-by-step instructions listed below:
To add the Unico Check Flutter SDK to your project, run the following command using the Flutter CLI:
This command adds the following line to your package's pubspec.yaml
file:
Obtaining Packages Manually: The flutter pub add unico_check
command implicitly triggers the flutter pub get
command. If the package was not installed correctly, ensure that unico_check
is in your pubspec.yaml
file and run flutter pub get
manually.
Contact the CSs and/or Onboarding team.
Request the SDK Key by entering 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 receive your SDK Key to implement the AccessBioConfigDataSource.
Once the SDK installation is complete, proceed to the implementation by reading the following Usage and Integration Guide:
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.
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.
To get started, follow these 3 simple steps in your project:
Instantiate a new Builder:
Specify the path of additional files (if added to your project):
Specify the path of the AI model files if you are using the Smart Camera functionality:
Starting from version 3.18.0, to have the SDK automatically fetch additional resources, simply omit the setResourceDirectory
method and ensure the CSP settings are correctly applied for SDK usage.
By default, the SDK Web uses the production environment.
It is possible to configure which environment will be used during SDK execution. Use the SDKEnvironmentTypes
enumeration, which includes the following options:
SDKEnvironmentTypes.PROD
: for the Production environment;
SDKEnvironmentTypes.UAT
: for the Staging environment.
Here is an example of how to implement it:
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 shown below:
his object is mandatory, and if not implemented correctly (covering all success or error events), it will throw an exception that, 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. It should not be opened or serialized, as its characteristics may change without prior notice. Its use must be exclusive to interactions with the APIs to ensure the integrity and security of the data. Unico is not responsible for any damages arising from this practice, as modifications may occur unexpectedly.
The base64
and encrypted
files can vary in size due to several factors, including the quality of the devices and the photos generated, as well as Unico's business rules. To avoid issues in your application, do not restrict the size of the string generated by the SDK for these files in your programming logic or infrastructure.
If it is necessary to convert the base64 string to a bitmap, the standard method does not work for Android. You need to perform a split at the comma (,) for it to function correctly. If you want to learn more, read the article:How to convert a Base64 string into a Bitmap image to show it in a ImageView?.
To start the camera with the settings made so far, you need to create an instance of the builder using the build()
method.
Then, once the camera is "built", you need to configure the camera capture mode.
The camera setup will be done through the prepareSelfieCamera()
method available from the builder. This method takes 2 parameters:
The UnicoConfig
class obtained in this step;
The desired camera mode, which can be:
SelfieCameraTypes.NORMAL
for normal camera mode;
SelfieCameraTypes.SMART
for smart camera mode.
This method returns a promise that, when resolved, provides an object used to actually open the camera through the open
method, which takes the callback functions as parameters.
To optimize camera startup, you can separate the calls to the prepareSelfieCamera()
and open()
methods.
To use automatic capture, pass the Unico.SelfieCameraTypes.SMART
parameter to the prepareSelfieCamera
method.
For smart capture, the computer vision models must also be loaded through the setModelsPath
method, as explained in the first step of this guide.
Using the UnicoConfig
class:
It is possible to use the SDK Web with Interactive Liveness embedded in an iFrame. To do this, follow a similar implementation to the previous section in preparing the camera.
The camera setup will be done through the prepareSelfieCameraForIFrame()
method, also available from the builder. This method takes the same parameters as prepareSelfieCamera()
:
The prepareSelfieCameraForIFrame()
method only works if the implementation is within an iFrame. Using it outside of an iFrame results in error 73724. Similarly, using prepareSelfieCamera()
within an iFrame also results in error 73724.
For the capture to work correctly, the <iframe>
element must be implemented as shown below:
To execute the capture, the browser must be in fullscreen mode so that the SDK can automatically resize itself. Therefore, when starting the capture, the SDK will display a screen requesting the frame to open in fullscreen mode. See the following example:
After allowing fullscreen usage, the capture frame will open normally:
Apple restricts the use of fullscreen APIs specifically on iPhones (iPads are acceptable). Therefore, for captures on iPhones, it is necessary to configure the positioning of the iFrame manually.
After capturing images, the next step is to send the generated encrypted
image from the SDK to the Client APIs.
For security reasons, the interval between the generation of the encrypted data and the sending through one of the available flows must 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.
In this section, you will find a list of best practices for implementing the Unico IDCloud platform SDK
Unico provides a set of PoCs (Proof of Concept) that are implementations in various languages supported by the SDK, presenting functional code examples with flows and methods in the context of the SDK. These examples are for educational purposes, making it easier to understand the expected sequence and adapt it to the code that our clients will implement. You can consult the available PoCs at this link and request them by opening a ticket with our support team through the client portal.
SDKs are constantly evolving to ensure greater security and new features. It is essential for clients to maintain a routine of updates, as well as agility in critical updates. For more details, please refer to the SDK update policy.
It is important to ensure that you update to the most recent version available:
Android: [list of versions];
iOS: [list of versions];
Flutter: [list of versions];
Web: [list of versions].
We know that your application uses various other libraries and functionalities, often loaded simultaneously with Unico's SDK. As a good practice for updates, avoid upgrading our SDK at the same time as updating any other functionality/library. This is because if you encounter a failure and/or change in behavior, it can be challenging to determine the root cause. We recommend performing updates separately to ensure greater control over validations and to use our staging environment.
If you are having difficulties, open a ticket in our client portal with the following information (to expedite the process):
What is the language of the SDK you are trying to update?
If it’s mobile (Android or iOS), is it a native or hybrid implementation (please provide details)?
In the case of JavaScript implementation, which framework is being used?
What is the current version of the SDK you are trying to update? (not necessary if it's a new installation);
What is the new version you are attempting to install/update?
Please provide the API Key you are using;
Does the update consist solely of upgrading the SDK, or are other components/functionalities also being changed/updated/modified? If so, please describe which additional items are being modified;
Provide a description of the steps executed and what the results/errors were;
Please attach evidence and inputs related to the failure/problem (log files containing error/failure excerpts, screenshots, and/or videos reproducing the problem).
Upon successfully capturing an image, the onSuccessSelfie
method returns a ResultCamera
object that has 2 attributes:
Base64 of the captured image, which can be used if you want to display a preview of the image in your app;
Encrypted, which is a JWT object that must be sent in the REST API calls. The JWT (Encrypted) should be used strictly during the image submission via Unico's APIs. Do not open and/or serialize this attribute, as its characteristics may change without notice. Its use must be exclusive to interactions with the APIs to ensure the integrity and security of the data. Unico is not responsible for any damages arising from this practice, as modifications may occur unpredictably. As mentioned, the SDK already provides the Base64 attribute to obtain the image in question. An example case in Swift:
Method: onSuccessSelfie
print("(result.encrypted)")
for Encrypted
print("(result.base64)")
for Base64
print("(result)")
for Encrypted and Base64.
In summary: never attempt to read or manipulate the Encrypted (JWT) attribute.
For security reasons, the JWT must be sent within a period of 10 minutes. If the sending exceeds this window, the package will be considered invalid. Consider this time during the user's journey in your application and avoid subsequent changes.
For security reasons, the JWT must be sent only once to Unico's backend. If there is a problem processing the image and/or an error in the response, a new biometric capture must be performed to generate a new encrypted object and then send this new file to Unico's backend.
Virtualizing devices in your application's testing dynamics can be interpreted as an attempt to bypass the security layers incorporated into the biometrics provider, potentially returning the errors:
Mobile:
73006 - Unable to open camera on emulators.
Web:
73600 - Could not find camera resource.
73400 - Could not initialize camera.
To avoid rework and misidentification of errors, testing should be conducted on physical devices.
All communication and requests are based on API Keys predefined in the client's instance. It is very important that your implementation uses the same API Key in the capture flow and the sending flow, as this avoids integration errors, facilitates validation, and traceability of processes and flows. If you have questions about your API Key, please contact technical support.
During testing and validation processes, it is normal to keep DevTools open to check flows and requests. However, the capture validation method should not be considered during these tests, as the SDK identifies it as a possible fraud and invalidates the submission when sent to the backend. Therefore, when performing end-to-end flows, it is essential to keep DevTools disabled and proceed with normal capture.
When uploading versions for the WEB SDK, if there is also an update for resource files, always delete the old file and insert the new ones in the Public folder. This is because files may have the same name and not be replaced. Also, ensure that there is no internal cache of the old resource files after the update and new build.
For implementation in Flutter applications, always use our specific Flutter plugin for this purpose. We reinforce that you should not try to implement the native versions of our SDK (Android, iOS) through bridges in Flutter applications, as this action often generates errors not mapped by Unico's engineering team.
The SDK implementation has 2 steps until the photo capture and generation of the encrypted:
Camera preparation;
Camera opening.
In the first step, you need to specify the type of camera to be used and the bundle with the API KEY information. If everything is correct, the authentication with the SDK backend is successfully carried out. In the second step, the camera is opened, usually triggered by a button click from the user. Authentication with the SDK backend may take a few seconds, so placing this step along with the camera opening in the user's button click can create frustration and a sense of slowness. Therefore, the ideal approach is to prepare the camera during the loading of the capture orientation page, so when the user decides to open the camera, the loading will be faster, enhancing the final experience.
This way, you will optimize your implementation and improve the speed of your application, reducing the perception of slowness in processing for your end user.
Always perform cache cleaning before building and uploading new versions. If this cleaning is not performed, you may encounter errors related to cached dependencies that may have been removed or updated in new versions. Below are some examples of how to do this:
For Flutter, use the command:
Remove the file: pubspec.lock
or;
flutter pub get
.
For iOS, use the command:
pod cache clean 'unicocheck-ios' –all
or;
pod cache clean –all
or;
Remove podfile.lock
and follow up with pod install
.
For Android in build Gradle, use the command:
./gradlew clean
.
Obfuscation is a process of transforming bytecode into a less human-readable form, thereby making reverse engineering more difficult. The obfuscation tool you use in your application may affect the functioning of the SDK; therefore, it is necessary that it does not obfuscate the SDK code. A good indicator of obfuscation problems is to check if your application works in debug mode and fails to work when built in release mode, as obfuscation does not modify files in debug mode.
Thus, during the SDK implementation, you need to add the configuration for the Unico SDK to your obfuscation rules; otherwise, you will face issues trying to build the project using the iOS, Android, or Flutter SDK. Below are the links for obfuscation settings for each OS:
Android: Link to Android obfuscation documentation;
iOS: Link to iOS obfuscation documentation.
Unico provides a staging environment for clients to conduct tests and validations of their implementations before making any changes or alterations in the production environment. We emphasize the importance of this step to ensure greater security when making changes in production. Ensure that your testing plan includes as many validations and scenarios as you will encounter in the production environment (such as device variations, tests with limited connectivity, etc.). Important: remember that the staging environment has its own set of configurations/parameters, such as service accounts and specific API Keys (different from the production environment).
Create a checklist considering your company's change management plan:
Ensure you are using the latest version of the SDK;
Ensure that you have done an extensive test in the staging environment;
Ensure that you have followed the steps mentioned in this document;
Check for changes in third-party libraries;
Ensure that you are following your team’s deployment guidelines;
Avoid doing large changes in production.
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.
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:
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.
This step is optional, but highly recommended for aligning the capture process 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 shown in the example below:
After generating the theme object as exemplified above, it should be passed as a parameter to the setTheme
method of the unicoCameraBuilder:
In this section, you will find all the necessary information for using and integrating the Unico IDCloud SDK into your Flutter applications for document capture
This guide has been designed to help you implement the Flutter 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 Flutter Customization section.
In this camera mode, there is a capture frame to assist the user in positioning the document correctly. Once the document is properly positioned, the user must click the button to take a photo of the document.
The SDK does not perform any validation of 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.
To get started, create an instance of the builder (generated through the UnicoCheckBuilder
interface), providing the relevant context and the implementation of the UnicoListener
class as parameters.
The implementation of this class is straightforward and can be done with just a few lines of code. All you need to do is override the callback methods with the business logic of your application.
Note that, as in the previous example, the implementation work of the UnicoListener
class is largely about configuring the callback methods. Each method is called in a specific situation based on the SDK's response.
Override the methods exemplified above with your application’s business logic.
onErrorUnico(UnicoError error)
This method is invoked with a parameter of type ErrorBio
that contains details about the error. Learn more about the ErrorBio
type in the error handling section.
onUserClosedCameraManually()
EThis method is invoked whenever the user manually closes the camera, such as by clicking the "Back" button.
onSystemClosedCameraTimeoutSession()
This method is invoked once the maximum session time is reached (without capturing any image).
You can configure the session timeout in seconds using setTimeoutSession
. The default and minimum timeout is 40 seconds.
onSystemChangedTypeCameraTimeoutFaceInference()
This method is invoked when the maximum time for face detection is reached without detection.
The maximum time is 13 seconds. The mode is then switched to manual capture to facilitate the user’s action.
All the above methods must be created as indicated in your project (even without any logic); otherwise, the project won’t compile successfully.
The implementation of these listener methods should be done through an instance of the iAcessoBioSelfie
class.
The camera open method needs to know what to do when an image is successfully captured or when an error occurs during the process. The camera's behavior is informed through the deployment of listeners, which are invoked in both success and error scenarios.
By implementing the listeners, you can specify what happens in your app in the event of an error (e.g., the onErrorDocument
method) or success (e.g., the onSuccessDocument
method) during the image capture process.
onSucessDocument
MethodWhen successfully capturing an image, this method is invoked and returns an object of type ResultCamera
, which is used later in the REST API requests:
The ResultCamera
object returns two attributes: base64
and encrypted
.
The base64
attribute can be used if you want to display a preview of the image in your app.
Both the encrypted
and base64
attributes can be sent in the REST API calls of the by Client.
If it is necessary to convert the base64 string to a bitmap, the standard method does not work for Android. You need to perform a split at the comma (,) for it to function correctly. If you want to learn more, read the article: How to convert a Base64 string into a Bitmap image to show it in a ImageView?.
onErrorDocument
MethodIf an error occurs during the image capture, this method is invoked and returns an object of typeUnicoError
:
Learn more about the types of ErrorBio
in the SDK's error handling section.
To open the camera, the openCameraDocument()
method is used. This method is made available through the object generated by an instance of the UnicoCheck
class.
This method accepts the following parameters:
A JSON file containing the credentials, generated in the credentials configuration step.
The listeners configured above.
The type of document to be captured, which can be one of the following:
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 RG
DocumentCameraTypes.OUTROS("descrição")
Capture any other document
If you need to capture a document for which there is no specific frame (e.g., RNE, among others), use the DocumentCameraTypes.OUTROS("descrição")
frame, which will allow you to use a generic rectangular frame to guide any capture.
Example using the open CNH:
After capturing images, the next step is to send the generated base64
image from the SDK to the Client 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.
In this section, you will find all the information needed to install the Unico IDCloud platform SDK in your Web applications
The capture frame provided through the SDK is compatible with the following combinations of browsers and operating systems:
In general, the SDK supports WebRTC and newer versions of the browsers listed above. Due to compatibility and security reasons, functionality in 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.
It is a system component that allows Android or iOS applications to display web content directly inside the app, based on the same code project. It is responsible for navigation on websites and web content within apps.
It is necessary to have implemented the Web SDK in an application that contains a secure domain with the https protocol.
The Web SDK is compatible with webviews running on Android 8 (API 26) or higher. For the SDK to function correctly, it is necessary to add some permissions and configurations to the AndroidManifest file, which are as follows:
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.
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:
iOS provides two ways to use Webviews in applications: WKWebView and SFSafariViewController. We recommend using SFSafariViewController for better compatibility with DOM features. You can find an implementation example through our PoCs here.
The component is certified 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 will then request the same permission from the native application. It is mandatory for your native application to have the necessary permissions set in the configuration files.
Our support is restricted 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.
To implement the Unico IDCloud Web SDK into your Android app, follow the steps listed below:
The Web SDK employs the use of Web Workers to enhance security and performance. Therefore, you need to add the following settings to your Content Security Policy (CSP):
If your application has a CSP, this configuration is mandatory to ensure the correct functioning of the SDK.
Contact the CSs and/or Onboarding team.
Request the SDK Key by entering 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 receive your SDK Key to implement the AccessBioConfigDataSource.
Once the SDK installation is complete, proceed to the implementation by reading the following Usage and Integration Guide:
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.
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.
Internal product improvements. These improvements do not directly affect the end-user experience, keeping the interface and external functionality unchanged.
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.
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.
Updated Liveness SDK and Interactive Server;
Accessibility improvements to the Liveness stream with interaction.
Updated Liveness SDK and Interactive Server.
Updated Liveness SDK and Interactive Server;
Resolution of conflicts between observability tools.
SDK Update and Liveness Server Interaction.
In this section, you will find the list of all available SDK PoCs to support your implementation
Here you will find a list of terms, words, or technical expressions used in this documentation, along with their respective descriptions.
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 .
In this section, you will find all the necessary information for handling errors from the Unico IDCloud SDK in your Web applications
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.
In this camera mode, there is a capture frame to assist the user in positioning the document correctly. Once the document is properly positioned, the user must click the button to take a photo of the document.
The SDK does not perform any validation of 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.
To get started, you need to perform 2 simple steps in your project:
Instantiate a new Builder:
Specify the path for additional files (if added to your project):
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 configure this for both Web Desktop and Mobile.
The functionality of the frame can often be affected by certain design systems that have some type of grid system, such as Bootstrap or Material-UI. To minimize this risk, make sure to position the frame (id="box-camera") in a part of the code that does not inherit unwanted CSS rules.
For Web Desktop versions, it is possible to restrict the size of the frame so that it does not take up the entire dimension of your WebApp. To do this, simply wrap the frame (id="box-camera") in another HTML tag, as shown below:
Ideally, you should try to maintain an appropriate aspect ratio between height and width, which will make it easier to frame the user's face. Here’s an example:
Following the example above, the frame respects the size of the parent element, represented here by the container. This way, you have the flexibility to implement the frame in the most convenient manner for your application (such as in a modal, for example).
Testing by resizing the screen through your browser's developer mode does not work. It is recommended that this type of testing be done by resizing the window of your browser.
For a Web Mobile view, it is recommended that the capture frame occupies 100% of the screen to avoid issues with computer vision algorithms. If the capture area is distorted, the automatic capture functionality (Smart Camera) may experience problems with face tracking calculations.
Therefore, it is recommended that in the Web Mobile view:
The capture frame occupies 100% of the device screen (100vw/vh);
Avoid horizontal or vertical scrolling (this can be minimized with a modal);
Testing devices using your browser's developer mode does not work, as the camera used by your browser is the same as that of your desktop, which has a completely different resolution than a mobile device's camera. We recommend that this type of testing be conducted directly on the device.
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:
This object is mandatory, and if it is not correctly implemented (covering all success or error events), it will generate an exception, which, if unhandled, will be displayed in the user's console.
To start the camera with the configurations made so far, you need to create an instance of the builder using the build()
method:
Next, with the camera "assembled," you need to configure the capture mode of the camera. The camera preparation is done using the prepareDocumentCamera()
method, provided by the builder. This method takes 2 parameters:
The UnicoConfig
class obtained in this step;
The type of document to be captured.
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 the callback functions configured in the step above as a parameter.
Below is an example using the capture of a driver's license (CNH): Using the UnicoConfig
class:
If you need to capture a document for which there is no specific frame (e.g., RNE, among others), use the DocumentCameraType.None
frame, which will allow you to use a generic rectangular frame to guide any capture.
After capturing images, the next step is to send the generated base64
image from the SDK to the Client APIs.
In this section, you will find the Postman collection for the by Client REST 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 .
Have the Developer SDK installed.
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 .
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 .
To download the AI file for the Unico Check Web SDK, click .
Installation via NPM package
To install the SDK into your project via , simply run the following command:
Installation via CDN
version 3.18.9
.
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 .
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 .
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 .
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 .
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 .
3.18.10
3.18.9
3.18.8
3.18.7
3.18.6
3.18.5
3.18.4
3.18.0 -> 3.18.3
3.16.4 -> 3.17.0
3.16.3
3.16.2
3.14.1 -> 3.16.1
3.11.1 -> 3.14.0
3.10.2 -> 3.11.0
3.10.1
3.9.1 -> 3.10.0
3.9.0
3.8.3
3.8.2
3.8.0 -> 3.8.1
3.7.1 -> 3.7.2
3.6.5 -> 3.7.0
3.6.3 -> 3.6.4
3.6.1 -> 3.6.2
3.5.4 -> 3.6.0
3.5.3
3.5.0 -> 3.5.2
Kotlin
PoC in Kotlin that implements the Android SDK
Swift
PoC in Swift that implements the iOS SDK
ObjC
PoC in ObjC that implements the iOS SDK
SFTP
React Native
PoC in React Native that implements the iOS and Android SDK
SFTP
Flutter
PoC in Dart that implements the Flutter SDK
Angular
PoC in Angular that implements the Web SDK
JS Vanilla
PoC in JS Vanilla (JS) that implements the Web SDK
Next JS
PoC in Next that implements the Web SDK
React JS with TypeScript
PoC in React with TypeScript that implements the Web SDK
React JS with JavaScript
PoC in React with JavaScript that implements the Web SDK
React JS with Webpack + Babel
PoC in React JS with Webpack + Babel that implements the Web SDK
SFTP
Vue JS
PoC in Vue JS that implements the Web SDK
Android
PoC in an Android Webview that runs the Web SDK
SFTP
Android x Web Flow
PoC of communication flow between web application and native Android Webview
SFTP
iOS
PoC in an iOS Webview that runs the Web SDK
SFTP
iOS x Web Flow
PoC of communication flow between web application and native iOS Webview
SFTP
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.
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
APIKey
Key created in the Unico portal, used mandatorily in the interface between systems, carrying configurations that will be applied in the integrations. Unique for each operation/flow and always linked to the branch and service account.
File .pem
It is a file containing the private key used for OAuth2 authentication.
Bundle
It is a package containing the credentials for using the SDK.
Service account
It is a non-personal account that belongs to the application and not to an individual user, used for OAuth2 authentication.
Branch
Identification of the client's branch or operation, linked to the service account and all users who will have access to the system.
Instance
URL of the page for accessing Unico's product portal.
Encrypted
An JWT file generated by our SDK, which will be used in the integration. It has a 10-minute expiration and can only be used once
IDCloud Portal
Local Access point to Unico's product.
ProcessID
Identification generated after the process is created.
SDK
It is a set of tools or packages provided by Unico to facilitate the capture of face images and/or documents.
Flow
It is an attribute that carries configurations and defines the end customer's journey in the biometrics process in by Unico.
TenantID
It is a unique identifier for your company within Unico.
Capabilities
These are the functionalities that can be utilized on the IDCloud platform.
Drop
É quando uma foto é recusada pelo motor de bioIt occurs when a photo is rejected by the biometrics engine due to low quality and/or some error from the engine.
getCode()
Method used to obtain the error code that occurred.
getDescription()
Method used to obtain the description of the error that occurred.
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
Type: CNH
Content: Brazilian National Driving License
String numero;
String rgNumero;
String cpfNumero;
String nomeCivil;
List string filiacao;
Datetime dataNascimento;
Datetime data_habilitacao;
Datetime data_expiracao;
Datetime data_emissao;
String local_emissao;
String categoria;
String renachNumero;
Type: RG
Content: Brazilian General Registration
String numero;
String orgao_emissor;
String uf_emissor;
String cpfNumero;
String carteira_profissionalNumero;
String certificado_militarNumero;
String cnsNumero;
String nis_pis_pasepNumero;
String ctpsNumero;
String ctps_serie;
String ctps_uf;
String titulo_eleitorNumero;
String nomeCivil;
String nome_social;
List string filiacao;
Datetime dataNascimento;
String naturalidade;
Datetime data_emissao;
Type: CIN
Content: Brazilian national Identity Card
string rgNumero;
string cpfNumero;
string nomeCivil;
string nome_social;
List string filiacao;
Datetime dataNascimento;
Datetime data_expiracao;
Datetime data_emissao;
string orgao_emissor;
string local_emissao;
string naturalidade;
string nacionalidade;
Type: Passport
Content: Brazilian Passport
string numero;
string nome;
string sobrenome;
string pais_emissor;
string nacionalidade;
string naturalidade;
Datetime data_nascimento;
Datetime data_emissao;
Datetime data_expiracao;
string autoridade.
Type: UNKNOWN
Content: Unknown document.
Type: CNH
Content: Brazilian National Driving License
String numero;
String rgNumero;
String cpfNumero;
String nomeCivil;
List string filiacao;
Datetime dataNascimento;
Datetime data_habilitacao;
Datetime data_expiracao;
Datetime data_emissao;
String local_emissao;
String categoria;
String renachNumero;
Type: RG
Content: Brazilian General Registration
String numero;
String orgao_emissor;
String uf_emissor;
String cpfNumero;
String carteira_profissionalNumero;
String certificado_militarNumero;
String cnsNumero;
String nis_pis_pasepNumero;
String ctpsNumero;
String ctps_serie;
String ctps_uf;
String titulo_eleitorNumero;
String nomeCivil;
String nome_social;
List string filiacao;
Datetime dataNascimento;
String naturalidade;
Datetime data_emissao;
Type: CIN
Content: Brazilian national Identity Card
string rgNumero;
string cpfNumero;
string nomeCivil;
string nome_social;
List string filiacao;
Datetime dataNascimento;
Datetime data_expiracao;
Datetime data_emissao;
string orgao_emissor;
string local_emissao;
string naturalidade;
string nacionalidade;
Type: Passport
Content: Brazilian Passport
string numero;
string nome;
string sobrenome;
string pais_emissor;
string nacionalidade;
string naturalidade;
Datetime data_nascimento;
Datetime data_emissao;
Datetime data_expiracao;
string autoridade.
Type: UNKNOWN
Content: Unknown document.
Windows (desktop)
N/A
N/A
Android
N/A
iOS
N/A
MacOS (desktop)
N/A
Endpoint to retrieve the signed document in PDF format. Only for flows with electronic signature.
/api/v1/service/file/{documentId}
Document ID.
Endpoint to create a new process at Unico.
/
Defines where the user will be redirected at the end of the process. Possible values are: A URL (e.g., https://developers.unico.io/callback), a Schema URL for redirection in native mobile applications (e.g., br.com.meupacote.app://callback - the callback must be registered in your mobile app), or no redirection (just include '/').
/
The ID of the branch where the process will be created. If there is only one branch associated with the service account, this parameter is not required. If there is a separation of processes by branch, you will receive the branch IDs from the Unico team.
60837cd3-ed3c-4038-ad7c-0a85ad64b03a
Biometric token identification. Mandatory for the "idtoken" flow and must use an ID from a completed process of any other identity verification flow.
60837cd3-ed3c-4038-ad7c-0a85ad64b03a
Expiration time of the process in seconds from its creation. The value must be in the format "10080s", with "s" at the end. If not provided, the default value of 7 days will be used.
3600s
Flow type. See flow details in the 'Overview' section of this documentation.
iddocssign
idlive
, id
, idlivetrust
, idtrust
, idcheck
, iddocs
, idsign
, iddocssign
, idchecktrust
, idchecktrustdocs
, idchecktrustsign
, idchecktrustdocssign
, idcheckserpro
, creditoconsignado
, idcheckserprodocssign
, idcheckserprodocs
, idtoken
, idtokensign
, idtokentrust
Purpose of the process.
creditprocess
creditprocess
, biometryonboarding
, carpurchase
User information.
Contextual information about the process. These fields are presented in the user journey, improving conversion by contextualizing the reason for biometric capture.
Array containing document information. All items in the array become mandatory if using any flow with electronic signature.
Endpoint to retrieve the evidence set from the identity verification process by Unico.
/client/v1/process/{processId}/evidenceset
Process ID.
Endpoint to get the result of an Liveness + Identity Verification + Risk Score process by Client.
/processes/v1/{processId}
Process ID.
Valid access token.
Valid APIKEY with Liveness + Identity Verification + Risk Score capabilities enabled.
Endpoint to create a new process for Liveness + Identity Verification + Behavior Alert in by Client.
/processes/v1
Valid access token.
Valid APIKEY with Liveness + Identity Verification + Behavior Alert capabilities enabled.
Use case for the operation.
Onboarding
The ID of the branch where the process will be created. If there is only one branch associated with the service account, this parameter is not required. If there is a separation of processes by branch, you will receive the branch IDs from the Unico team.
60837cd3-ed3c-4038-ad7c-0a85ad64b03a
Encrypted file generated by the SDK or Base64 (if not using Liveness).
/9j/4AAQSkZJR...
User information.
Endpoint to create a new process for Liveness + Identity Verification + Risk Score by Client.
/processes/v1
Valid access token.
Valid APIKEY with the capabilities Liveness + Identity Verification + Risk Score enabled.
Use case of the operation.
Onboarding
The ID of the branch where the process will be created. If there is only one branch associated with the service account, this parameter is not required. If there is a separation of processes by branch, you will receive the branch IDs from the Unico team.
60837cd3-ed3c-4038-ad7c-0a85ad64b03a
Encrypted file generated by the SDK or base64 (if not using Liveness).
/9j/4AAQSkZJR...
User information.
Endpoint to create a new process for Liveness + 1:1 Validation by Client.
/processes/v1
Valid access token.
Valid APIKEY with the capabilities Liveness + 1:1 Validation enabled.
Identifier of the process generated during the biometric transaction creation, whose photo will be used for comparison.
80371b2a-3ac7-432e-866d-57fe37896ac6
The ID of the branch where the process will be created. If there is only one branch associated with the service account, this parameter is not required. If there is a separation of processes by branch, you will receive the branch IDs from the Unico team.
60837cd3-ed3c-4038-ad7c-0a85ad64b03a
Encrypted file generated by the SDK or base64 (if not using Liveness).
/9j/4AAQSkZJR...
User information.
Endpoint to create a new process for liveness + 1:1 validation + behavior alert in the by Client.
/processes/v1
Access-token válido.
Valid APIKEY with the capabilities Liveness + 1:1 Validation + Behavior Alert.
Identifier of the process generated during the biometric transaction creation, whose photo will be used for comparison.
80371b2a-3ac7-432e-866d-57fe37896ac6
The ID of the branch where the process will be created. If there is only one branch associated with the service account, this parameter is not required. If there is a separation of processes by branch, you will receive the branch IDs from the Unico team.
35d734c4-7fbb-4b2f-a1dc-7e1575514819
Encrypted file generated by the SDK or base64 (if not using Liveness).
/9j/4AAQSkZJR...
User information.
Endpoint to create a new Liveness + Identity Verification process via by Client.
/processes/v1
Valid access token.
Valid APIKEY with Liveness + Identity Verification capabilities enabled.
Operation use case.
Onboarding
The ID of the branch where the process will be created. If there is only one branch associated with the service account, this parameter is not required. If there is a separation of processes by branch, you will receive the branch IDs from the Unico team.
60837cd3-ed3c-4038-ad7c-0a85ad64b03a
Encrypted file generated by the SDK or base64 (if not using Liveness).
/9j/4AAQSkZJR...
User information.
Endpoint to get a user's documents for reuse in by Client.
/client/v1/process
User identifier value (e.g., CPF value).
12345678909
Document type (e.g., BR_CPF).
BR_CPF
Valid access-token.
Valid APIKEY with the capabilitie Document Capture and Reuse enabled.
Endpoint to create a new Document process via Client.
/processes/v1
Valid access token.
Valid APIKEY with the capabilitie Document Capture and Reuse enabled.
User information.
Information about the document to be captured.
Endpoint to create a new isolated Liveness process via by Client.
/processes/v1
Valid access token.
Valid APIKEY with the Liveness capability enabled.
The ID of the branch where the process will be created. If there is only one branch associated with the service account, this parameter is not required. If there is a separation of processes by branch, you will receive the branch IDs from the Unico team.
60837cd3-ed3c-4038-ad7c-0a85ad64b03a
Encrypted file generated by the SDK.
/9j/4AAQSkZJR...
User information.
Endpoint to create a new process for Liveness + Identity Verification + Behavior Alert + Risk Score in the by Client.
/processes/v1
Valid access token.
Valid APIKEY with the capabilities Liveness + Identity Verification + Behavior Alert + Risk Score enabled.
Use case of the operation.
Onboarding
The ID of the branch where the process will be created. If there is only one branch associated with the service account, this parameter is not required. If there is a separation of processes by branch, you will receive the branch IDs from the Unico team.
60837cd3-ed3c-4038-ad7c-0a85ad64b03a
Encrypted file generated by the SDK or Base64 (if not using liveness).
/9j/4AAQSkZJR...
User information.
Endpoint to get the result of a Liveness + Identity Verification + Behavior Alert + Risk Score process by Client.
/processes/v1/{processId}
Process ID.
Valid access token.
Valid APIKEY with the capabilities Liveness + Identity Verification + Behavior Alert + Risk Score enabled.
Endpoint to retrieve the evidential set of the signature. Only for flows with electronic signature.
/api/v1/service/evidence/{documentId}
Document ID.
Endpoint to retrieve the selfie from the Unico process.
/client/v1/process/{processId}/selfie
Process ID.
Optional flag to return the raw selfie file.
true