Selfie Validation
Description
The Selfie Validation module verifies if a user's selfie has been captured by a live individual at the time of the verification indicating no fraudulent impersonation attempt. It also supports additional configurations to suit your business requirements.
Steps Involved
The module implements the following steps to complete the verification process:
- Prompts the user to capture their selfie and recommends best practices for the process.
- Guides the user with real-time instructions on the live preview screen while capturing the selfie.
For example,
- "Place your face inside the circle."
- "Please move away from the camera."
- "Stay still and capture."
- Performs additional quality and liveness checks.
In a fraudulent "photo-on-photo" scenario, a fraudster attempts to use an existing photograph of a different individual to deceive the verification system.
Inputs
The module initiates a live selfie capture which serves as the input for the validation process.
Module Configurations
The following is a list of toggle configurations supported by the module.
| Feature | Description | Default Value |
|---|---|---|
| Show Capture Instructions | When the toggle is set to active, it enables a screen with instructions before the live selfie capture screen. You can configure the instructions to suit your verification process requirements. | Yes |
| Disable Liveness | When the toggle is set to active, it disables the liveness check for the module. | No |
Configuring Quality Checks
In addition to liveness check, the selfie validation module can also execute additional quality checks on the image.
Click the link to learn more about the additional selfie checks.
If configured, the details relevant to these quality checks are displayed under the qualityChecks object in the response.
Module Outputs
The following information is returned in the Results API
Success Scenario
{
"module": "Selfie Validation",
"moduleId": "selfie_validation",
"selfieImageUrl": "<URL>",
"attempts": "2",
"apiResponse": {
"status": "success",
"statusCode": 200,
"metadata": {
"requestId": "1659158312255-6b19f301-0747-4a89-b539-6296e0d1bfa8",
"transactionId": "asdfasdfa"
},
"result": {
"details": [
{
"liveFace": {
"value": "yes"
},
"qualityChecks": {
"eyesClosed": {
"value": "no",
"confidence": "high"
},
"occlusion": {
"value": "yes",
"confidence": "high"
},
"multipleFaces": {
"value": "no",
"confidence": "high"
}
}
}
],
"summary": {
"action": "pass",
"details": []
}
}
},
"previousAttempts": []
}
Response Details
| Object | Field | Description |
|---|---|---|
module | - | The name of the module is "Selfie Validation." |
moduleId | - | The unique identifier for the "Selfie Validation" module is "selfie_validation." |
selfieImageUrl | - | The signed URL of the selfie image captured by user. This URL remains valid for a duration of 15 minutes. |
attempts | - | The number of attempts made by user to capture the selfie. |
previousAttempts | - | If there were multiple attempts made by the user, this array will contain the older attempts, sorted from latest to oldest |
apiResponse | - | The response for the "Selfie Validation" module. If there were multiple attempts made by the user, this key will contain the latest attempt. |
status | - | The status of the response is "success." |
statusCode | - | The code representing the response status. |
metadata | - | The metadata related to the response. |
requestId | - | A unique identifier to track the request |
transactionId | - | The transaction ID used in the API request |
result | - | The result of the response. |
details | - | Details related to the validation process, including liveness and quality checks. |
liveFace | value | If the value is "yes," the liveness check is successful. |
qualityChecks | - | Quality checks performed on the selfie. |
eyesClosed | value | If the value is "no," the eyes are not closed with high confidence. |
occlusion | value | If the value is "yes" face is partially or fully occluded by objects, hands, masks, accessories (like sunglasses, hats), or other obstructions that prevent clear visibility of facial features |
multipleFaces | value | If the value is "no," multiple faces are not detected with high confidence. |
summary | action | It displays the recommended action, which is "pass." Details are empty in this case. |
previousAttempts | - | No previous attempts were made in this case. |
Understanding the apiResponse Object
| Key | Description | Values Possible |
|---|---|---|
| liveFace.value | Result of the liveness check | "yes" or "no" |
| liveFace.confidence | How confident is the AI model about it's liveness prediction | "high" or "low" |
| qualityChecks | Results of quality checks performed on the selfie More details in the next section | JSON |
| summary | A final summary based on the checks performed in the module What is summary? Default Summary Config | JSON |
Failure Scenarios
Below is the response in Results API for a typical error scenario.
{
"module": "Selfie Validation",
"moduleId": "selfie_validation",
"selfieImageUrl": "<URL>",
"apiResponse": {
"status": "failure",
"statusCode": 422,
"metadata": {
"requestId": "1659160534742-e604164f-a4a4-4e6f-9292-3b8d99e97f45",
"transactionId": "123456"
},
"result": {
"error": "No face detected",
"summary": {
"action": "fail",
"details": [
{
"code": "121",
"message": "Face Not detected"
}
]
}
}
},
"previousAttempts": []
}
List of Errors Possible
Below are all the errors possible in this module. The 'statusCode' is present under apiResponse
| StatusCode | Summary | Description |
|---|---|---|
| 422 | Face not detected | When face is not detected in selfie captured |
| 429 | Rate limit error | When the number of requests per minute has crossed the set limit for your credentials |
| 5xx | Server Error | Please reachout to HyperVerge |
Default Summary Configuration
| Scenario | 'Action' in summary |
|---|---|
| Face not detected | fail after 2 retakes |
| Non Live selfie | manualReview |
| Quality check failed | manualReview after 2 retakes |
| None of the above | pass |
Reading Results for Selfie Validation
We recommend using the liveFace parameter in the response to decide the result.
liveFace.value= “yes” , when the face in the image taken is liveliveFace.value= “no” , when face in the image taken is not liveactionparameter in the response can be used to decide whether the image sent requires manual review or not (optional)
Logic Recommended
How to assess the Liveness, based on the response returned by the API:
Approved
statusCode= 200,liveFace.value= "yes" ,- and
action= "pass"
Rejected
statusCode= 200,liveFace.value= "no",action= "fail",- and all other status codes
Manual Review
statusCode= 200,liveFace.value= "yes"/"no",action= "manualReview"- Retries can be enabled to avoid manual review. Maximum of 3 retries is recommended.