Direct API processing
This endpoint lets you upload customer photos by yourself and start processing immediately without using iDenfy WEB or mobile SDK UI. The verification token is deactivated after this request.
Using this implementation type you lose these features: 3D liveness detection and short photos sequence before taking photos. If 3D liveness detection and short photos sequence before taking photos is required for you, please use another integration type.
Sending request
Send a HTTP POST request to: https://ivs.idenfy.com/api/v2/process
The request must contain basic auth headers where username is API key and password is API secret.
API key and API secret can be retrieved by contacting iDenfy's tech support or iDenfy's sales team:
The maximum request size is 20 MB
The request must contain JSON with these parameters:
Key | Required | Explanation | Type | Constraints |
---|---|---|---|---|
authToken | Yes | Verification token | String | - |
country | Yes | Country code in 3166-1 alpha-2 format | String | Any country in alpha-2 code |
documentType | Yes | Document type | String | Possible values: - ID_CARD - PASSPORT - RESIDENCE_PERMIT - DRIVER_LICENSE - OTHER |
images | Yes | Images for verification (Base64 format) | Object | - |
Contents of images
JSON key | Type | Can be null | Constraints | Explanation |
---|---|---|---|---|
FRONT | String | Yes | - Max size of 6MB | Base64 encoded image of document front |
BACK | String | Yes | - Max size of 6MB | Base64 encoded image of document back |
FACE | String | Yes | - Max size of 6MB | Base64 encoded image of persons face |
UTILITY_BILL * | String | Yes | - Max size of 6MB | Base64 encoded image of an utility bill or any other custom additional step that was set in advance* |
Images required for a specific document should be provided, usually at least
FRONT
andFACE
.
Examples
Example request
{
"authToken": "3FA5TFPA2ZE3LMPGGS1EGOJNJE",
"country": "LT",
"documentType": "ID_CARD",
"images": {
"FRONT":"/9j/4AAQSkZJRgABAQAAAQABAAD/4...",
"BACK":"/9j/4AAQSkZJRgABAQAAAQABAAD/4...",
"FACE":"/9j/4AAQSkZJRgABAQAAAQABAAD/4..."
}
}
Example responses
For successful API calls, which start the processing, there will be no message, just a response with a positive 200 status.
An example response that failed
Failed API calls will return a message identifying the problem.
{
"message": "No image provided for step 'BACK'",
"identifier": "MISSING_VALUE",
"documentation": "https://documentation.idenfy.com",
"severity": "NOT_SEVERE"
}
Note that in case of a malformed JSON body or API key/secret mismatch you will receive a standard iDenfy API error response. For more on iDenfy API responses visit iDenfy error messages.
Also, it is possible to receive 200 OK status with an error message that system was not able find the document in the provided photo. In this case:
- Validate photos should be turned off at environment settings level, contact techsupport about it via our dashboard
- It is possible to skip Validate photos by providing
skipAnalysis: true
with the request - Change photo so that document and/or selfie could be recognized