Skip to main content

Face Authentication API (v2)

API Description

Objective

This Face Authentication API (v2) verifies if the selfie provided in the request matches the image corresponding to a unique identifier(UID) in database.

InputOutput
The selfie of the customer and the unique transaction ID.It reflects if the database contains a record that matches the selfie.

API URL

https://ind-orion.hyperverge.co/v2/faceAuth

Overview

The API is RESTful and uses standard HTTP verbs and status codes. The responses are in JSON format and you should upload all images and files as form-data through a POST request.

Authentication

You need a unique pair of application ID ( appId ) and application key (appKey) from HyperVerge to verify your identity for accessing the API.

API Request Details

Method - POST

Headers

ParameterMandatory or OptionalDescriptionValid Values
content-typeMandatoryThis parameter defines the media type for the request payload.multipart/form-data
acceptMandatoryThis parameter defines the media type for the response.application/json
appId MandatoryApplication ID shared by HyperVergeN/A. This is a unique value.
appKey MandatoryApplication Key shared by HyperVerge N/A. This is a unique value.

Input

The following table provides the complete information on the parameters used in the request body for the API call.

Parameter Mandatory or OptionalType Description
transactionIdMandatorystringThe unique identifier for the customer's application.
uidType Mandatory stringThe type of the unique identifier. It can be the transaction ID or any other unique identifier for the enrolment.
Note
It is commonly configured as "transaction_id".
uid Mandatory stringThe unique identifier for the record in your database used during enrolment.
Note
It is commonly configured as the transaction ID for the record.
selfieMandatoryfileThis is the selfie image of the user. The maximum image size is 6 MB.

Additional Quality and Fraud Checks

In addition to its liveness and face match checks, the API can also execute additional checks on the image (also known as the liveness checks).
You can view the complete list of additional checks under the Additional Checks For Liveness page.

note

If you include any quality check parameter in the request, the result is added to the qualityChecks object in the response.

Sample Request

The following code shows a standard curl request for the API.

curl --location --request POST 'https://ind-orion.hyperverge.co/v2/faceAuth' \
--header 'Content-Type: multipart/form-data' \
--header 'appId: <Enter_the_HyperVerge_appId>' \
--header 'appKey: <Enter_the_HyperVerge_appKey>' \
--form 'transactionId="<Enter_the_HyperVerge_transactionID>"' \
--form 'uidType="transaction_id"' \
--form 'uid="<Enter_the_Unique_Identifier>"' \
--form 'selfie=@"<path_to_selfie_image>"' \
--form 'ignoreSelfieQuality="<yes_or_no>"'

Success Response Sample

The following is a sample response for a matching record in the database.

{
"status": "success",
"statusCode": 200,
"metaData": {
"requestId": "1679918521052-b71a052c-d686-4162-827e-04298699573e",
"transactionId": "Kala-Orion-Test-2"
},
"result": {
"data": {
"matchScore": 99,
"match": "yes"
},
"summary": {
"action": "pass",
"details": []
}
}
}

Failure Response Sample

The following are the sample failure responses for the API. Alternatively, you can find the details of the failure responses listed here.

{
"status": "success",
"statusCode": 200,
"metaData": {
"requestId": "<requestID>",
"transactionId": "<transactionID>"
},
"result": {
"data": {
"matchScore": 13,
"match": "no"
},
"summary": {
"action": "fail",
"details": [
{
"code": "E200",
"message": "Face mismatch"
}
]
}
}
}

Error Response Sample

The following are the sample error responses for the API.

{
"error": "\"transactionId\" is required",
"statusCode": 400,
"status": "failure",
"requestId": "d00a7e14-dbc7-4489-aa5a-cdd56a544578",
"transactionId": null
}

Failure and Error Response Details

A response from the API can be either a failure or an error. The following table lists all failure and error responses, along with their respective status codes, error messages, and descriptions.

Status CodeError MessageError Description
200Face MismatchThe face matching score is below the threshold, resulting in a failed match.
422Selfie Quality IssueThe quality of the selfie image is insufficient for the face match.
400Face Not DetectedThe API failed to detect a face in the selfie image.
422Non-Live SelfieThe selfie provided is not live.
404No Record FoundNo matching record was found in the database for the transaction ID used in the request.
404Manual ReviewWhen the model is not confident about the face match result, the API requests for a manual review.
400"transactionId" is requiredThe request does not contain the transaction identification number.
401Missing/Invalid credentialsThe request either does not contain the mandatory credentials or contains invalid credentials.
404Lendernode not foundThe API failed to get the lender node.
429Requests rate limit exceededThe number of transactions per minute has crossed the limit set for your credentials.
500Internal Server ErrorThere is an error with HyperVerge's server. Kindly contact the HyperVerge team for resolution.
Was this helpful?
Ask AIBeta
Hi! How can I help?
Ask me anything about HyperVerge products, APIs, and SDKs.
Try asking: