Face Authentication
Description
Objective
This Face Authentication module verifies if the selfie provided in the request matches the image corresponding to a unique identifier(UID) in database.
| Input | Output |
|---|---|
| The selfie of the user and a unique transaction ID. | The face match result of the user's selfie matched against all the existing records in the database. |
Inputs
The following table provides the complete information on all the input parameters for the module.
| Parameter | Mandatory or Optional | Type | Description |
|---|---|---|---|
transactionId | Mandatory | string | The unique identifier for the user's application. |
uidType | Mandatory | string | The 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 | string | The unique identifier for the record in your database used during enrolment.
Note It is commonly configured as the transaction ID for the record. |
selfie | Mandatory | file | This is the selfie image of the user. The maximum image size is 6 MB. |
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": []
}
}
}
Error Response Samples
The following are the sample error responses.
- Missing Transaction ID
- Missing/Invalid Credentials
- LenderNode Not Found
- Service Unavailable
- Internal Server Error
The following is a sample response for a request missing the transactionId.
{
"error": "\"transactionId\" is required",
"statusCode": 400,
"status": "failure",
"requestId": "d00a7e14-dbc7-4489-aa5a-cdd56a544578",
"transactionId": null
}
{
"error": "Missing/Invalid credentials",
"statusCode": 401,
"status": "failure",
"requestId": "76e8c846-40af-4fcb-9641-942379e3fcce",
"transactionId": null
}
{
"error": "Lendernode not found",
"statusCode": 404,
"status": "failure",
"requestId": "b0e5e94c-2abf-45e8-972e-075ce37ff636",
"transactionId": "test-20230308141758885"
}
{
"error": "Rate limit exceeded",
"statusCode": 429,
"status": "failure",
"requestId": "1678985904709-5a62b5bd-247a-41ad-91c7-234ba03ae63b",
"transactionId": "test_trxid"
}
{
"status": "failure",
"statusCode": "500",
"error": {
"message": "Internal server error",
"timestamp": 1662720725493
}
}
Failure and Error Response Details
A failure or error response from the module contains a
failure status with a relavant status code and error message.
The following table lists all error responses. | Status Code | Error Message | Error Description |
|---|---|---|
| 400 | ""transactionId" is required | The request does not contain the transaction identification number. |
| 401 | Missing/Invalid credentials | The request either does not contain the mandatory credentials or contains invalid credentials. |
| 404 | Lendernode not found | The API failed to get the lender node. |
| 429 | Requests rate limit exceeded | The number of transactions per minute has crossed the limit set for your credentials. |
| 500 | Internal Server Error | There is an error with HyperVerge's server. Kindly contact the HyperVerge team for resolution. |