Verify document photo (base64)

This endpoint allows the matching between the user selfie and the photo on the ID document simultaneously.

The IDCard photo sent in this request is provided at the response of the method Validate Document, so is necessary to store the photo temporarily to send it along with the uploaded photo sample taken at the moment.

Document - Verify document photo (base64)

POST https://api.biometrid.com/api/1.1/document/selfie-compare-base64

Headers

Name
Type
Description

Content-type

string

Request content type (This is not required to be set. Referenced only to show how we expect data to be sent). { "Content-Type": "application/json" }

x-biometrid-key

string

Application Client Key

x-biometrid-secret

string

Application Client Secret

Request Body

Name
Type
Description

facemap

string

Required only for specific liveness engine version. Paired with photo. See example section below.

photo

string

Required only for specific liveness engine version. Paired with facemap. See example section below.

photo1

string

Image (base64 string) representation to perform biometric comparison. Max size: 1MB

photo2

string

Image (base64 string) representation to perform biometric comparison. Max size: 1MB

livenessId

string

Liveness session identifier obtained from successful validation. Required if liveness is active for in Client configuration.

HTTP/1.1 200 OK
//Selfie Commpare Process
{
    "status": true,
    "data": {
        "message": "FACE_COMPARED_WITH_SUCCESS",
        "verified": true,
        "confidence": "0.99"
        }
    }
}

//Selfie Commpare Process (specific engine version case).
{
    "status": true,
    "data": {
        "message": "FACE_COMPARED_WITH_SUCCESS",
        "verified": true
        }
    }
}

//Selfie Compare Process Failed
{
    "status": false,
    "data": {
        "message": "FACE_COMPARISON_FAILED"
        }
    }
}
Example (JSON)
{
    "photo1": "/9j/4AAQSkZJRgABAQAAAQABAA...", // base64 
    "photo2": "/9j/4AAQSkZJRgABAQAAAQABAA...", // base64 
    "livenessId": "d3213-23dds2-75rgu6-ds3434"
}

// Specific engine version (liveness process integrated)

{
    "photo": "/9j/4AAQSkZJRgABAQAAAQABAA...", // base64 
    "facemap": "/9j/4AAQSkZJRgABAQAAAQABAA...", // base64 
}

Success 200

Field

Type

Description

status

Boolean

Response status.

data

Object

Response main data.

message

String

Message regarding the selfie compare process.

verified

Boolean

Photos comparison result.

confidence

String

Photos comparison result confidence.

Last updated

Was this helpful?