🔍 Verify ID

Use the following endpoints to verify an already registered user by submitting different side of identification images and performing liveness detection.

Workflow for Verify Endpoints

  1. General Setup:

    • The user sends a POST request to one of the verification endpoints (/id/front, /id/back, /liveness/multi) with a specific set of headers and a request body.

    • The headers include an API key and an Authorization token (Bearer).

    • Each request can either start a new verification transaction or continue an existing one by providing a transaction_id.

  2. Verification Process:

    • For National ID verification, the user sends a base64-encoded image of the ID (front or back).

    • For liveness detection, the user sends three base64-encoded face images captured in quick succession.

    • The server processes these inputs and returns a response indicating whether the verification process was successful.

  3. Response Handling:

    • A successful response includes details such as whether the verification was completed, the identity verification status, and user details.

    • Errors such as bad requests or unauthorized access will return appropriate error codes and messages.

post
Body
imagestringRequired
name_check_valuestring | nullableOptional
transaction_idstring | nullableOptional
client_transaction_idstring | nullableOptional
request_idstring | nullableOptional
countrystring | nullableOptional
getExtractedDatabooleanOptional
Responses
200

Success

post
/api/DigitalIdentity/verify/id/front
POST /api/DigitalIdentity/verify/id/front HTTP/1.1
Host: 
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 158

{
  "image": "text",
  "name_check_value": "text",
  "transaction_id": "text",
  "client_transaction_id": "text",
  "request_id": "text",
  "country": "text",
  "getExtractedData": true
}
200

Success

{
  "services": {
    "Validations": {
      "validation_errors": [
        {
          "field": "text",
          "value": "text",
          "errors": [
            {
              "code": 1,
              "message": "text"
            }
          ]
        }
      ]
    },
    "validations": {
      "validation_errors": [
        {
          "field": "text",
          "value": "text",
          "errors": [
            {
              "code": 1,
              "message": "text"
            }
          ]
        }
      ]
    },
    "spoofing": {
      "fake": true
    },
    "classification": {
      "doc_type": "text"
    },
    "liveness": true,
    "AML": {
      "AML_matched": true,
      "data": [
        {
          "caseNo": "text",
          "caseYear": 1,
          "recordDate": "2025-11-08T03:50:48.069Z",
          "fullName": "text",
          "idNumber": "text",
          "dateOfBirth": "2025-11-08T03:50:48.069Z",
          "score": "text"
        }
      ]
    },
    "SRC": {
      "isValid": true,
      "errorCode": 1,
      "errorKey": "text",
      "errorMessage": "text"
    }
  },
  "data": {
    "isVerificationProcessCompleted": true,
    "isDigitalIdentityVerified": true,
    "deviceInfo": "text",
    "user": {
      "id": 1,
      "name": "text",
      "surname": "text",
      "fullName": "text",
      "userName": "text",
      "emailAddress": "text",
      "phoneNumber": "text",
      "idNumber": "text",
      "address": "text"
    },
    "idFrontData": {
      "name_english": "text",
      "first_name_english": "text",
      "last_names_english": "text",
      "name": "text",
      "address": "text",
      "first_name": "text",
      "last_names": "text",
      "govern": "text",
      "idKey": "text",
      "dateOfBirth": "2025-11-08T03:50:48.069Z",
      "address_1": "text",
      "address_2": "text",
      "address_english": "text",
      "address_1_english": "text",
      "address_2_english": "text",
      "govern_english": "text",
      "city": "text",
      "district": "text",
      "idNumber": "text",
      "gender": "text",
      "client_transaction_id": "text",
      "request_id": "123e4567-e89b-12d3-a456-426614174000",
      "transaction_id": "123e4567-e89b-12d3-a456-426614174000",
      "transactionId": "123e4567-e89b-12d3-a456-426614174000"
    },
    "idBackData": {
      "maritalStatus": "text",
      "job": "text",
      "jobTitle": "text",
      "religion": "text",
      "husbandName": "text",
      "releaseDate": "2025-11-08T03:50:48.069Z",
      "idExpiry": "2025-11-08T03:50:48.069Z",
      "marital_status_english": "text",
      "religion_english": "text",
      "gender_english": "text",
      "husbandName_english": "text",
      "job_english": "text",
      "job_title_english": "text",
      "idNumber": "text",
      "gender": "text",
      "client_transaction_id": "text",
      "request_id": "123e4567-e89b-12d3-a456-426614174000",
      "transaction_id": "123e4567-e89b-12d3-a456-426614174000",
      "transactionId": "123e4567-e89b-12d3-a456-426614174000"
    }
  },
  "error_code": 1,
  "error_message": "text",
  "error_descriptions": null
}
post
Body
imagestringRequired
name_check_valuestring | nullableOptional
transaction_idstring | nullableOptional
client_transaction_idstring | nullableOptional
request_idstring | nullableOptional
countrystring | nullableOptional
getExtractedDatabooleanOptional
Responses
200

Success

post
/api/DigitalIdentity/verify/id/back
POST /api/DigitalIdentity/verify/id/back HTTP/1.1
Host: 
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 158

{
  "image": "text",
  "name_check_value": "text",
  "transaction_id": "text",
  "client_transaction_id": "text",
  "request_id": "text",
  "country": "text",
  "getExtractedData": true
}
200

Success

{
  "services": {
    "Validations": {
      "validation_errors": [
        {
          "field": "text",
          "value": "text",
          "errors": [
            {
              "code": 1,
              "message": "text"
            }
          ]
        }
      ]
    },
    "validations": {
      "validation_errors": [
        {
          "field": "text",
          "value": "text",
          "errors": [
            {
              "code": 1,
              "message": "text"
            }
          ]
        }
      ]
    },
    "spoofing": {
      "fake": true
    },
    "classification": {
      "doc_type": "text"
    },
    "liveness": true,
    "AML": {
      "AML_matched": true,
      "data": [
        {
          "caseNo": "text",
          "caseYear": 1,
          "recordDate": "2025-11-08T03:50:48.069Z",
          "fullName": "text",
          "idNumber": "text",
          "dateOfBirth": "2025-11-08T03:50:48.069Z",
          "score": "text"
        }
      ]
    },
    "SRC": {
      "isValid": true,
      "errorCode": 1,
      "errorKey": "text",
      "errorMessage": "text"
    }
  },
  "data": {
    "isVerificationProcessCompleted": true,
    "isDigitalIdentityVerified": true,
    "deviceInfo": "text",
    "user": {
      "id": 1,
      "name": "text",
      "surname": "text",
      "fullName": "text",
      "userName": "text",
      "emailAddress": "text",
      "phoneNumber": "text",
      "idNumber": "text",
      "address": "text"
    },
    "idFrontData": {
      "name_english": "text",
      "first_name_english": "text",
      "last_names_english": "text",
      "name": "text",
      "address": "text",
      "first_name": "text",
      "last_names": "text",
      "govern": "text",
      "idKey": "text",
      "dateOfBirth": "2025-11-08T03:50:48.069Z",
      "address_1": "text",
      "address_2": "text",
      "address_english": "text",
      "address_1_english": "text",
      "address_2_english": "text",
      "govern_english": "text",
      "city": "text",
      "district": "text",
      "idNumber": "text",
      "gender": "text",
      "client_transaction_id": "text",
      "request_id": "123e4567-e89b-12d3-a456-426614174000",
      "transaction_id": "123e4567-e89b-12d3-a456-426614174000",
      "transactionId": "123e4567-e89b-12d3-a456-426614174000"
    },
    "idBackData": {
      "maritalStatus": "text",
      "job": "text",
      "jobTitle": "text",
      "religion": "text",
      "husbandName": "text",
      "releaseDate": "2025-11-08T03:50:48.069Z",
      "idExpiry": "2025-11-08T03:50:48.069Z",
      "marital_status_english": "text",
      "religion_english": "text",
      "gender_english": "text",
      "husbandName_english": "text",
      "job_english": "text",
      "job_title_english": "text",
      "idNumber": "text",
      "gender": "text",
      "client_transaction_id": "text",
      "request_id": "123e4567-e89b-12d3-a456-426614174000",
      "transaction_id": "123e4567-e89b-12d3-a456-426614174000",
      "transactionId": "123e4567-e89b-12d3-a456-426614174000"
    }
  },
  "error_code": 1,
  "error_message": "text",
  "error_descriptions": null
}
post
Body
imagestringRequired
face_1stringRequired
face_2stringRequired
face_3stringRequired
id_front_imagestring | nullableOptional
name_check_valuestring | nullableOptional
transaction_idstring | nullableOptional
client_transaction_idstring | nullableOptional
request_idstring | nullableOptional
countrystring | nullableOptional
getExtractedDatabooleanOptional
Responses
200

Success

post
/api/DigitalIdentity/verify/liveness/multi
POST /api/DigitalIdentity/verify/liveness/multi HTTP/1.1
Host: 
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 230

{
  "image": "text",
  "face_1": "text",
  "face_2": "text",
  "face_3": "text",
  "id_front_image": "text",
  "name_check_value": "text",
  "transaction_id": "text",
  "client_transaction_id": "text",
  "request_id": "text",
  "country": "text",
  "getExtractedData": true
}
200

Success

{
  "services": {
    "Validations": {
      "validation_errors": [
        {
          "field": "text",
          "value": "text",
          "errors": [
            {
              "code": 1,
              "message": "text"
            }
          ]
        }
      ]
    },
    "validations": {
      "validation_errors": [
        {
          "field": "text",
          "value": "text",
          "errors": [
            {
              "code": 1,
              "message": "text"
            }
          ]
        }
      ]
    },
    "spoofing": {
      "fake": true
    },
    "classification": {
      "doc_type": "text"
    },
    "liveness": true,
    "AML": {
      "AML_matched": true,
      "data": [
        {
          "caseNo": "text",
          "caseYear": 1,
          "recordDate": "2025-11-08T03:50:48.069Z",
          "fullName": "text",
          "idNumber": "text",
          "dateOfBirth": "2025-11-08T03:50:48.069Z",
          "score": "text"
        }
      ]
    },
    "SRC": {
      "isValid": true,
      "errorCode": 1,
      "errorKey": "text",
      "errorMessage": "text"
    }
  },
  "data": {
    "isVerificationProcessCompleted": true,
    "isDigitalIdentityVerified": true,
    "deviceInfo": "text",
    "user": {
      "id": 1,
      "name": "text",
      "surname": "text",
      "fullName": "text",
      "userName": "text",
      "emailAddress": "text",
      "phoneNumber": "text",
      "idNumber": "text",
      "address": "text"
    },
    "idFrontData": {
      "name_english": "text",
      "first_name_english": "text",
      "last_names_english": "text",
      "name": "text",
      "address": "text",
      "first_name": "text",
      "last_names": "text",
      "govern": "text",
      "idKey": "text",
      "dateOfBirth": "2025-11-08T03:50:48.069Z",
      "address_1": "text",
      "address_2": "text",
      "address_english": "text",
      "address_1_english": "text",
      "address_2_english": "text",
      "govern_english": "text",
      "city": "text",
      "district": "text",
      "idNumber": "text",
      "gender": "text",
      "client_transaction_id": "text",
      "request_id": "123e4567-e89b-12d3-a456-426614174000",
      "transaction_id": "123e4567-e89b-12d3-a456-426614174000",
      "transactionId": "123e4567-e89b-12d3-a456-426614174000"
    },
    "idBackData": {
      "maritalStatus": "text",
      "job": "text",
      "jobTitle": "text",
      "religion": "text",
      "husbandName": "text",
      "releaseDate": "2025-11-08T03:50:48.069Z",
      "idExpiry": "2025-11-08T03:50:48.069Z",
      "marital_status_english": "text",
      "religion_english": "text",
      "gender_english": "text",
      "husbandName_english": "text",
      "job_english": "text",
      "job_title_english": "text",
      "idNumber": "text",
      "gender": "text",
      "client_transaction_id": "text",
      "request_id": "123e4567-e89b-12d3-a456-426614174000",
      "transaction_id": "123e4567-e89b-12d3-a456-426614174000",
      "transactionId": "123e4567-e89b-12d3-a456-426614174000"
    }
  },
  "error_code": 1,
  "error_message": "text",
  "error_descriptions": null
}
import axios from 'axios';

const API_URL = "https://api.vlenseg.com/api/DigitalIdentity/verify/id/front";
const API_KEY = "your_api_key";
const ACCESS_TOKEN = "your_access_token";

const headers = {
    'Content-Type': 'application/json',
    'ApiKey': API_KEY,
    'Authorization': `Bearer ${ACCESS_TOKEN}`
};

const data = {
    transaction_id: null,
    image: "base64_encoded_image_string_here"
};

axios.post(API_URL, data, { headers })
    .then(response => {
        console.log(response.data);
    })
    .catch(error => {
        console.error(error.response ? error.response.data : error.message);
    });

Helpful Tips for Using Liveness Detection 🌟

Last updated