Skip to main content

Walkthrough Video

Overview

Liveness detection is a critical security layer that ensures:
  • Physical Presence: Confirms a real person is present during verification
  • Anti-Spoofing Protection: Prevents attacks using photos, pre-recorded videos, or masks
  • Face Matching: Optionally compares the live selfie with document photos
  • Biometric Quality: Ensures sufficient image quality for reliable verification

Biometric Types

Passive Liveness

Users take a selfie photo and receive immediate feedback. Analyzes micro-movements and 3D structure from a single photo.Type: PASSIVE_LIVENESS

Selfie Video

Users record a short video with head motions. Analyzes movement patterns across video frames.Type: SELFIE_VIDEO

Selfie Photo

Users take a selfie photo without feedback. Static image analysis only.Type: SELFIE_PHOTO

Configuration

{
  "settings": [
    {
      "fieldName": "BIOMETRICS",
      "value": "PASSIVE_LIVENESS"
    }
  ]
}

API Integration

Step 1: Submit Selfie for Liveness Check

Endpoint: POST /api/v1/verifications/{verificationId}/send-inputs
curl -X POST https://api.urtentic.com/api/v1/verifications/{verificationId}/send-inputs \
  -H "Authorization: Bearer ${API_KEY}" \
  -H "X-CLIENT-ID: ${CLIENT_ID}" \
  -F 'inputs=[{"fieldName":"SELFIE_VIDEO","fileName":"liveness_video.mp4","type":"FILE"}]' \
  -F 'documents=@/path/to/liveness_video.mp4'
Response:
{
  "status": "success",
  "message": "Inputs received successfully",
  "verificationId": "85c94e71-6e3f-4a19-b15c-781d8a876542"
}

Step 2: Get Verification Results

Endpoint: GET /api/v1/verifications/{verificationId}
curl -X GET https://api.urtentic.com/api/v1/verifications/85c94e71-6e3f-4a19-b15c-781d8a876542 \
  -H "Authorization: Bearer ${API_KEY}" \
  -H "X-CLIENT-ID: ${CLIENT_ID}"
Response:
{
  "id": "85c94e71-6e3f-4a19-b15c-781d8a876542",
  "flowId": "db50ed08-18fa-41e8-9e46-a44aca39f69d",
  "status": "COMPLETED",
  "steps": [
    {
      "stepId": "LIVENESS",
      "status": 1,
      "data": {
        "liveness_confirmation": true,
        "photo_of_face": "face_photo.jpg",
        "duplicate_check_via_facematch": false
      }
    }
  ]
}

Webhook Notification

{
  "eventName": "step_completed",
  "flowId": "db50ed08-18fa-41e8-9e46-a44aca39f69d",
  "timeStamp": "2024-01-10T10:31:00.000Z",
  "resource": "/api/v1/verifications/85c94e71-6e3f-4a19-b15c-781d8a876542",
  "metadata": { "userId": "user_12345" },
  "id": "LIVENESS",
  "status": 1,
  "data": {
    "liveness_confirmation": true,
    "photo_of_face": "face_photo.jpg",
    "duplicate_check_via_facematch": false
  }
}

Process Dependencies

Liveness can be used as input for other processes:
  • Document Verification: Uses liveness photo for face matching
  • Video Agreement: Can reference liveness data for face comparison

Implementation Tips

  • Guide users to well-lit areas for better capture
  • Show face positioning guidelines during capture
  • Handle camera permission denials gracefully
  • Provide retry options for failed attempts
  • Compress videos before upload (max 50MB recommended)
  • Set appropriate capture duration limits (5-30 seconds)
  • Validate media formats (MP4, WebM) client-side
  • Handle network interruptions during upload
  • Encrypt biometric data in transit and at rest
  • Delete biometric data after processing
  • Log liveness attempts for security monitoring
  • Explain biometric data usage to users