Liveness Engine

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.

  1. Various extensions supported for Liveness Verification API are -
  • .mp4
  • .webm
  1. The maximum file size limit (both on upload and URL) is 20 MB.
  2. 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 :disappointed:
  • Limited file type support :disappointed:
  • And hard to convince customers to record a video for a liveness check :disappointed:

To solve the above issues, we have brought Passive Liveness for our customers -

  • Liveness check with just an image/selfie :smiley:
  • Super fast response time :100:
  • Multiple file support - JPG, JPEG, and PNG :thumbsup:
  • Simple request body parameters :smiley:
  • An easy and clear response message with a liveness score :smiley:
  • Easy for the customer to click or upload an image :smirk:

Use Cases

  • Identity Fraud Prevention
  • Digital Onboarding
  • Full KYC using Passive Liveness

Sample Request & Response

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"'
{
  "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"
    }
  }
}