Digital Onboarding Documentation
  • Introduction
    • Obtaining The API Key
  • API Reference
    • Document Upload Error Responses
    • Uploading Face Image
    • Face Image Error Responses
    • Liveliness Verification
    • Liveliness Error Responses
    • Creating an eKYC Request
    • Accepting eKYC Request
    • Retrieving eKYC Request
    • Retrieving Single eKYC Request
    • Clearing eKYC Request
    • Deleting eKYC Request
Powered by GitBook
On this page
  1. API Reference

Uploading Face Image

This is where the real-time face verification occurs

This is the second step in the eKYC request creation process. When uploading the face image, please ensure that the image URL is accurate and that the image is downloadable. In addition to the face image, please also provide the unique document ID that you wish to compare it with. The document ID corresponding to the ID will be returned when uploading the document. The uploaded image will then be compared with the face image found in the document. If the faces do not match, an appropriate error message will be returned. Conversely, if the faces do match, the result will be stored in the database, and a match probability value between 0 and 1 will be returned.

When it comes to uploading image, two options will be given. First, simply provide the Lapis eKYC backend with the image URL, ensuring that it directs to the correct and exact location of the image file. Alternatively, you can choose to upload the image as a base64 string. Please do ensure that the file type is either in PNG or is in JPEG format. Please also ensure that the file size does not exceed 30MB.

Request Endpoint: /api/face-authentication Request Type: POST

Header:

{
  "Content-Type": "application/json",
  "Accept": "application/json",
  "x-api-key": "Your API key"
}

x-api-key: The API key you obtained upon signing up for the Lapis eKYC webpage.

Body: (When opting to upload images using a URL)

{
    "faceImage":"https://res.cloudinary.com/image/wkoqzmjz76gmg5zmfhjo.jpg",
    "documentIdentificationId":"64d3a6f3-6f71-4e15-a6ee-08b95b8f724e"
}

Body: (When opting to upload images using a base64)

{
    "faceImage_base64":"/9j/xvbhxchvbhbvcxvc/4QBMRXhpZgAATU0AKgAAAAgAAgESAAMAAAABAAYAAIdpAAQA................",
    "documentIdentificationId":"64d3a6f3-6f71-4e15-a6ee-08b95b8f724e"
}

faceImage: Front face image URL of user. documentIdentificationId: The unique ID returned from the previously uploaded document.

Note: Please make sure to provide the actual path of the image file as the image URL. This URL should be the direct location where the file image is stored.

Successful Response: Upon successful face verification, the API response will resemble the following structure:

Response status: 200

{
    "message": "Face match verification PASSED!",
    "score": "0.908"
}

score: Confidence level of the face match. 0 meaning the face doesn't match and 1 meaning the face matches 100%.

PreviousDocument Upload Error ResponsesNextFace Image Error Responses

Last updated 1 year ago