Main API Docs
  • Welcome!
  • General
    • Introduction
    • Authentication
    • Personal Access Tokens
    • Test IDs
    • Check Wallet Balance
  • Appruve Identity
    • Introduction
    • Ghana 🇬🇭
      • Verify Ghana TIN
      • Verify Ghana Driver License
      • Verify Ghana SSNIT ID
      • Verify Ghana Passport
      • Verify Ghana Voter ID
      • Verify Ghana Digital Address
    • Nigeria 🇳🇬
      • Verify Nigeria TIN
      • Verify Nigeria Driver License
      • Verify Nigeria NIN
      • Verify Nigeria vNIN
      • Verify Nigeria Voter ID
      • Verify Nigeria BVN
    • Kenya 🇰🇪
      • Verify Kenya KRA PIN
      • Verify Kenya National ID
    • Uganda 🇺🇬
      • Verify Uganda Voter ID
      • Verify Uganda Telco Subscriber
      • BulK Uganda Telco Subscriber Verification
  • Appruve Business
    • Introduction
    • Business Lookups
      • Nigeria 🇳🇬
        • Lookup with CAC number
        • Lookup using Tax ID (TIN)
      • Uganda Business Lookup 🇺🇬
      • Ghana Business Lookup 🇬🇭
    • Business Beneficial Ownership
      • Nigeria 🇳🇬
  • Appruve Agency
    • OCR For Sequential Verification
      • Senegal 🇸🇳
      • Nigeria 🇳🇬
      • Ghana 🇬🇭
      • Kenya 🇰🇪
      • Côte d'Ivoire 🇨🇮
      • Cameroon 🇨🇲
    • Standalone OCR
      • Nigeria 🇳🇬
      • Ghana 🇬🇭
      • Kenya 🇰🇪
      • Côte d'Ivoire 🇨🇮
      • Cameroon 🇨🇲
      • Senegal 🇸🇳
    • Perform Face Matching
    • Upload Selfie Photo
    • Get Liveness Detection Challenge
    • Verify Liveness Detection Challenge
    • Confirm Extracted ID Number
    • Verify Business Document By OCR
    • Verify Nigeria vNIN with selfie
  • Guides
    • Webhooks
    • ID Document to Selfie Matching
  • Mobile Sdks
    • Android SDK
    • iOS SDK
  • Resources
    • Country Codes
    • ID Types
    • Face Liveness Check
Powered by GitBook
On this page
  • 1. Perform OCR
  • 2. Perform Face Liveness Check (Optional)
  • 3. Upload the selfie photo
  1. Guides

ID Document to Selfie Matching

Verify the identity of a person using a Selfie Photo and an ID Document

PreviousWebhooksNextAndroid SDK

Last updated 3 years ago

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 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:

curl --location --request POST 'https://api.appruve.co/v1/verifications/selfie_image/ocr/gh/passport' \
--header 'Authorization: Bearer <token>' \
--form 'id_image=@/Users/path/p1.jpg' \
--form 'custom_params[userId]=323323' \
--form 'custom_params[firstName]=John' \
--form 'custom_params[lastName]=Doe'

Example response:

{
    "id_details": {
        "first_name": "John",
        "last_name": "Bruce",
        "passport_number": "G0000000",
        "date_of_birth": "1976-10-07",
        "date_of_issue": "2019-07-29",
        "date_of_expiry": "2029-07-30",
        "place_of_issue": "Accra",
        "id_photo": "url"
    },
    "transaction_reference": "f6ae7736-e9ba-43a4-b80f-afbca4eb47e0",
    "face_sharpness": 99.55,
    "face_brightness": 76.81
}

2. Perform Face Liveness Check (Optional)

3. Upload the selfie photo

Example request:

curl --location --request POST 'https://api.appruve.co/v1/verifications/selfie_image/upload' \
--header 'Authorization: Bearer ' \
--form 'selfie_image=@/Users/img.jpg' \
--form 'transaction_reference=93ca2d74-e11e-4044-82d9-da7db4225045'

Example response:

{
  "success": true,
  "id": "93ca2d74-e11e-4044-82d9-da7db4225045",
  "confidence_score": 100,
  "id_type": "passport",
  "country_code": "gh",
  "status": "success",
  "face_on_id_document": "url",
  "face_match_percent": 100,
  "id_match_percent": 100,
  "selfie_face_url": "url",
  "selfie_image_submitted": "url",
  "id_face_sharpness": 87,
  "id_face_brightness": 96,
  "selfie_face_sharpness": 88,
  "selfie_face_brightness": 90,
  "id_details": {},
  "created_at": "2020-05-10",
  "custom_params": {}
}

See the section on how to do this.

Upload the selfie photo taken by the user using the 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).

Use if you want to receive the verification result within your server side application.

OCR For Sequential Verification
Face Liveness Check
Upload Selfie Photo
Webhooks