appruve
Searchโ€ฆ
ID Document to Selfie Matching
Verify the identity of a person using a Selfie Photo and an ID Document
Appruve makes it easy to implement a selfie photo verification flow using an ID Document. There are three steps involved.

1. Perform OCR

The first step is to perform an OCR on the ID Document using one of the OCR For Sequential Verification endpoints. The PII details on the document is extracted. Once the extraction is successful, Appruve will do a lookup of the ID record from the Government database. If a valid Government ID record is found, Appruve will use the photo returned (unless there is no photo associated with the record in which case Appruve will crop the photo on the ID document) to match against the face in the Selfie that is uploaded subsequently. You can pass an optional custom_params object to store custom information. This information will be returned alongside the verification result object. A unique transaction_reference id will be returned. Use this in the next steps where transaction_reference is requested.
Example request:
1
curl --location --request POST 'https://api.appruve.co/v1/verifications/selfie_image/ocr/gh/passport' \
2
--header 'Authorization: Bearer <token>' \
3
--form '[email protected]/Users/path/p1.jpg' \
4
--form 'custom_params[userId]=323323' \
5
--form 'custom_params[firstName]=John' \
6
--form 'custom_params[lastName]=Doe'
Copied!
Example response:
1
{
2
"id_details": {
3
"first_name": "John",
4
"last_name": "Bruce",
5
"passport_number": "G0000000",
6
"date_of_birth": "1976-10-07",
7
"date_of_issue": "2019-07-29",
8
"date_of_expiry": "2029-07-30",
9
"place_of_issue": "Accra",
10
"id_photo": "url"
11
},
12
"transaction_reference": "f6ae7736-e9ba-43a4-b80f-afbca4eb47e0",
13
"face_sharpness": 99.55,
14
"face_brightness": 76.81
15
}
Copied!

2. Perform Face Liveness Check (Optional)

See the Face Liveness Check section on how to do this.

3. Upload the selfie photo

Upload the selfie photo taken by the user using the Upload Selfie Photo endpoint. Appruve will match the face on the selfie photo against the face on the matched Government ID record (or the face cropped from the ID document).
Example request:
1
curl --location --request POST 'https://api.appruve.co/v1/verifications/selfie_image/upload' \
2
--header 'Authorization: Bearer ' \
3
--form '[email protected]/Users/img.jpg' \
4
--form 'transaction_reference=93ca2d74-e11e-4044-82d9-da7db4225045'
Copied!
Example response:
1
{
2
"success": true,
3
"id": "93ca2d74-e11e-4044-82d9-da7db4225045",
4
"confidence_score": 100,
5
"id_type": "passport",
6
"country_code": "gh",
7
"status": "success",
8
"face_on_id_document": "url",
9
"face_match_percent": 100,
10
"id_match_percent": 100,
11
"selfie_face_url": "url",
12
"selfie_image_submitted": "url",
13
"id_face_sharpness": 87,
14
"id_face_brightness": 96,
15
"selfie_face_sharpness": 88,
16
"selfie_face_brightness": 90,
17
"id_details": {},
18
"created_at": "2020-05-10",
19
"custom_params": {}
20
}
Copied!
Use Webhooks if you want to receive the verification result within your server side application.
Last modified 4mo ago