API Reference
中文

Liveness Detection H5

Liveness Detection H5 Integration Guide

Overview

Liveness detection is a critical security feature designed to thwart spoofing attacks during digital authentication processes. This technology ensures that the entity attempting access is a live human being rather than a photograph, video, mask, or another form of replicated biometric attack.

Key Features

  • Leverages modern web browser capabilities
  • Seamless integration without additional plugins
  • Sophisticated algorithms analyzing real-time video feeds
  • Detects subtle movements and physical presence indicators

User Interaction Process

Users are guided through gesture-based verification:

  • Prompted to perform actions like "open your mouth"
  • Instructed to "blink your eyes"
  • Backend retrieves verification results
  • Provides a selfie upon successful live person detection

Integration Steps

  1. Retrieve Token API: Configure redirect URLs and generate liveness detection token
  2. User Verification: Complete liveness detection through H5 URL
  3. Result Retrieval: Obtain verification results or selfie

Token Retrieval API

Base URLs

RegionEndpoint
Singaporehttps://sg.apitd.net/verification/kyc/h5/liveness/token/v1
Indonesiahttps://id-credit.apitd.net/verification/kyc/h5/liveness/token/v1

Authentication Parameters

ParameterTypeDescriptionRequired
partner_codeStringPartner CodeYes
partner_keyStringPartner KeyYes

Request Configuration

ParameterTypeDescriptionRequired
partnerStringPartner code from TrustDecisionYes
appKeyStringApplication bundle identifier keyYes
countryStringRegion code (cn, sg, us, fra, idna)Yes

Request Example

{
    "success_redirect": "http://www.google.com",
    "failure_redirect": "http://www.facebook.com",
    "language": "en",
    "audio": true
}

Response Examples

Success Response

{
    "code": 200,
    "message": "success",
    "sequence_id": "17119500882*****29",
    "token": "a41701e4-b2a2-4f62-8cd4-9******3",
    "url": "https://static.tongdun.net/liveness/index.html#/progress?code=a41701e4-b2a2-4f62-8cd4-9******3&success_redirect=http%3A%2F%2Fwww.google.com&failure_redirect=http%3A%2F%2Fwww.facebook.com&language=en&audio=true&"
}

Failure Response

{
    "code": 11350,
    "sequence_id": "69b57131b6fb********61ccba118b60",
    "message": "Internal error"
}