Passive Liveness
Additional Validations Added
Both the passive image and passive video liveness have validations in place to reduce the number of false negatives and false positives.
For example, always make sure that the image or video has a minimum resolution of 800 x 800 and a maximum resolution of 2000 x 2000 so that the model is able to accurately detech the liveness of the face. Images and videos not in this range will be rejected.
Similarly, if the image or video is not taken from a mobile camera, and camera data is missing from the meta-data of the file, it is highly likely that the file will be rejected to prevent an image downloaded from the internet passing the liveness test.
EXIF Metadata Checks
This API only allows images which have the existence of the following EXIF Metadata tags:
FileSource
Make
DateTime
During development, you can skip these metadata checks by using the optional boolean key
skip_metadata_validation
in the request body.
Passive Video Liveness
Liveness Verification is the ability to detect the presence of a live user, rather than a representation such as a photo, a fake video, or a mask.
- Various extensions supported for Liveness Verification API are -
- .mp4
- .webm
- The maximum file size limit (both on upload and URL) is 20 MB.
- The maximum duration of the video (both on upload and URL) is 10 sec.
curl --location --request POST 'https://in.staging.decentro.tech/v2/kyc/forensics/video_liveness' \
--header 'client_id: <your_client_id>' \
--header 'client_secret: <your_client_secret>' \
--header 'module_secret: <your_module_secret>' \
--form 'reference_id="02a05f79-4d10-47d6-89a9-6e5b54160e3e"' \
--form 'consent="true"' \
--form 'consent_purpose="for bank account purpose only"' \
--form 'video=@"/path/to/file"' \
--form 'video_url=""'
{
"decentroTxnId": "DECXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"status": "SUCCESS",
"responseCode": "S00000",
"message": "Liveliness check performed successfully",
"data": {
"status": "SUCCESS",
"confidence": "1.0"
},
"responseKey": "success_liveness_check"
}
Passive Image Liveness
We know it's hard to do a Liveness check with a video of the customer. It results in the following -
- High response time
- Limited file type support
- And hard to convince customers to record a video for a liveness check
To solve the above issues, we have brought Passive Liveness for our customers -
- Liveness check with just an image/selfie
- Super fast response time
- Multiple file support - JPG, JPEG, and PNG
- Simple request body parameters
- An easy and clear response message with a liveness score
- Easy for the customer to click or upload an image
Use Cases
- Identity Fraud Prevention
- Digital Onboarding
- Full KYC using Passive Liveness
Sample Request & Response
Available in both
multipart/form
andapplication/json
request contracts
curl --location 'https://in.staging.decentro.tech/v2/kyc/forensics/liveness/passive' \
--header 'client_id: <your_client_id>' \
--header 'client_secret: <your_client_secret>' \
--header 'module_secret: <your_module_secret>' \
--form 'reference_id="ManishGupta"' \
--form 'consent="true"' \
--form 'purpose="for bank verification only"' \
--form 'image=@"/path/to/file"'
curl --location 'https://in.staging.decentro.tech/v3/kyc/farsight/liveness/passive' \
--header 'client_id: XXXXX' \
--header 'client_secret: XXXXXX' \
--header 'module_secret: XXXXXXXX' \
--header 'Content-Type: application/json' \
--data '{
"reference_id": "XXXXXXXX",
"consent": true,
"purpose": "XXXXXXX",
"image": "<BASE64>"
}'
{
"decentroTxnId": "DXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"status": "SUCCESS",
"responseCode": "S00000",
"message": "Passive liveness check performed successfully",
"data": {
"status": "SUCCESS",
"live": "yes",
"livenessScore": "85",
"needToReview": "no"
},
"responseKey": "success_liveness_check"
}
Active Video Liveness
Introduction
The Active Video Liveness API is designed to enable businesses and organizations to verify the authenticity of a person's identity through an active video liveness check. This API offers two essential functionalities:
- Initiate Session: This endpoint is used to start an active video liveness verification session.
- Get Video Liveness Data: After initiating a session, this endpoint allows you to retrieve the results of the video liveness check for a specific session.
Please note that the Active Video Liveness API involves matching a series of images against an individual's real-time video to verify their identity.
1. Initiate Session
Endpoint: POST /v2/kyc/forensics/active_video_liveness/initiate
Request Body
The request body for this API call should contain the following parameters:
- consent (boolean): A boolean value indicating the user's consent for the video liveness check.
- purpose (string): A description of the purpose for which this verification is being performed.
- reference_id (string): A unique identifier for the verification session.
- redirect_url (string): The URL to which the user should be redirected after the verification session is complete.
- callback_url (string): The URL to which the verification results will be sent.
- face_image_urls (array): An array of URLs pointing to face images to be used for matching (up to 4 images).
- face_image_base64s (array): An array of base64-encoded face images to be used for matching (up to 4 images).
Note: A total of only 4 images are allowed for matching, so the sum of the number of URLs and base64 images should not exceed 4.
Response Body
- decentroTxnId (string): A unique transaction identifier.
- status (string): The status of the session initiation (SUCCESS or FAILURE).
- responseCode (string): A response code indicating the result of the initiation.
- videoLivenessUrl (string): The URL where the user's video liveness verification can be performed.
The following code snippet shows a sample request and response body.
{
"consent": true,
"purpose": "Identity Verification",
"reference_id": "UNIQUE_ID_12345",
"redirect_url": "https://yourapp.com/redirect",
"callback_url": "https://yourapp.com/callback",
"face_image_urls": [
"https://example.com/image1.jpg",
"https://example.com/image2.jpg"
],
"face_image_base64s": [
"base64_encoded_image1",
"base64_encoded_image2"
]
}
{
"decentroTxnId": "BC5CD047DB924564AD2B378F5B876963",
"status": "SUCCESS",
"responseCode": "S00000",
"videoLivenessUrl": "https://yourapp.com/verify-video/BC5CD047DB924564AD2B378F5B876963"
}
2. Get Video Liveness Data
Endpoint: POST /v2/kyc/forensics/active_video_liveness/:decentro_transaction_id
Request Body
The request body for this API call should contain the following parameters:
- consent (boolean): A boolean value indicating the user's consent for accessing the verification results.
- purpose (string): A description of the purpose for which the verification results are being requested.
- reference_id (string): The reference identifier for the verification session.
Response Body
Upon a successful request, the API will respond with the following information:
- decentroTxnId (string): The unique transaction identifier.
- status (string): The status of the request (SUCCESS or FAILURE).
- responseCode (string): A response code indicating the result of the request.
- data (object): The verification data, which includes the following:
- videoFaceMatchResults (array): An array of objects, each containing information about the matched face images, match score, and covariance.
- audioMatchResults (object): An object containing the match score for audio verification.
- staticRisk (string): A boolean value indicating whether there is a static risk (true or false).
- prerecordedRisk (string): A boolean value indicating whether there is a prerecorded risk (true or false).
liveliness (string): A liveliness status (e.g., "yes"). - geolocation (object): The geographical location of the verification, including latitude and longitude.
The following code snippet shows a sample request and response body.
{
"consent": true,
"purpose": "Identity Verification Results",
"reference_id": "UNIQUE_ID_12345"
}
{
"decentroTxnId": "BC5CD047DB924564AD2B378F5B876963",
"status": "SUCCESS",
"responseCode": "S00000",
"data": {
"videoFaceMatchResults": [
{
"originalImage": "https://example.com/original_image1.jpg",
"results": {
"matchScore": 90,
"covariance": 95
},
"finalMatchImage": "https://example.com/matched_image1.jpg"
},
{
"originalImage": "https://example.com/original_image2.jpg",
"results": {
"matchScore": 85,
"covariance": 92
},
"finalMatchImage": "https://example.com/matched_image2.jpg"
}
],
"audioMatchResults": {
"matchScore": 80
},
"staticRisk": "false",
"prerecordedRisk": "false",
"liveliness": "yes",
"geoLocation": {
"latitude": "12.9789808",
"longitude": "77.6438327"
}
}
}
Updated 6 months ago