Biometric KYC
The Biometric KYC product lets you verify the ID information of your user and confirm that the ID actually belongs to the user, this is achieved by comparing the user's SmartSelfie™ (a combination of grayscale liveness images and one colored image) to either the photo of the user on file in an ID authority database or a photo of their ID card.
You need to perform two steps to use this product:
- Make a request to Smile Identity for a job to be performed
- Upload the requirements for the job
Request Type: POST
Environment | URL |
Sandbox | |
Production |
Keys | Type | Required | Description |
source_sdk | string | Yes | The integration option you are using. For rest api send the value as "rest_api" |
source_sdk_version | string | Yes | The version of the integration option you are using |
file_name | string | Yes | This is the name of the zip file that will be uploaded in the PUT request to the upload URL |
signature | string | Yes | Your calculated access signature |
timestamp | string | Yes | The timestamp that was used to calculate the sec_key (in ISO date/time format) |
smile_client_id | string | Yes | This is your partner id which can be found on the side navigation panel of the Smile ID partner portal |
partner_params | object | Yes | A JSON object containing the partner parameters below as well as any additional key value pairs you wish to include for tracking which will be returned in the response |
{job_type | string | Yes | The type of job you want to perform. This will be set to "1". |
job_id | string | Yes | A value generated by you, so you can track jobs on your end. This value must be unique, can be any string and can follow your identifier convention |
user_id} | string | Yes | A value generated by you, so you can track users on your end. This value must be unique, can be any string and can follow your identifier convention. |
model_parameters | string | No | This parameter is specific to mobile SDK, can be left as an empty JSON object |
callback_url | string | No | An endpoint on the partner side where Smile ID will send the results of a job to in the form of a POST request (with no authorisation headers) |
At the end of the request, you will receive a job number for tracking and a url where you will be uploading your images
{
"source_sdk": "rest_api",
"source_sdk_version": "1.0.0",
"file_name": "attachments.zip",
"signature": "<calculated signature>",
"timestamp": "<timestamp e.g. 2021-08-12T17:57:00.614879>",
"smile_client_id": "<partner id>",
"partner_params":
{
"job_type": "1",
"job_id":"job_09876",
"user_id":"user_12345"
},
"model_parameters": {},
"callback_url": "https://<your callback URL>/"
}
In the response body to the prep upload request, you will receive an AWS s3 bucket link. You will upload the images for face verification to this link. The URL is structured like:
"https://smile-uploads-test.s3.us-west-2.amazonaws.com/videos/
<partner_id>/<partner_id>-<smile_job_id>-<random hash>/attachments.zip
?AWSAccessKeyId=<>
&Content-Type=application%2Fzip
&Expires=1598449184&Signature=<>
&x-amz-security-token=<>&x-amz-server-side-encryption=AES256"
200: OK
A record has now been created waiting for the job to be processed once the required data has been uploaded
{
"upload_url": "https://smile-uploads-test.s3.us-west-2.amazonaws.com/videos/<partner_id>/<partner_id>-<smile_job_id>-<random hash>/selfie.zip?AWSAccessKeyId=<>&Content-Type=application%2Fzip&Expires=1598449184&Signature=<>&x-amz-security-token=<>&x-amz-server-side-encryption=AES256",
"ref_id": "<partner_id>-<smile_job_id>-<random hash>",
"smile_job_id": "0000000001",
"camera_config": "null", ---sdk specific---
"code": "2202"
}
400: Bad Request
Trying to use a job_id in partner_params that has already been used
{
"error": "Job already exists. Did you mean to set the retry flag to true?",
"code": "2215"
}
To perform a job, Smile ID requires a Zip file that contains the following information:
- images - images are Selfie and/or ID card photo and/or liveness images
- Info.json file - the structure of the info.json file is detailed below
The images can either be parsed inline as a base64 encoded string or the image files themselves can be zipped with the info.json file. The supported file types for the images are png and jpg.
Request Type: PUT
Environment | URL |
Sandbox | Upload URL you were supplied while making a Job Request |
Production | Upload URL you were supplied while making a Job Request |
The request body will be of type binary (the zip file)
Info.json file
Parameter | Description |
package_information | This contains information about the rest api you’re calling. We recommend you use the following as the package_information: "package_information": { "apiVersion": { "buildNumber": 0, "majorVersion": 2, "minorVersion": 0 } } |
id_info | The country and id type you want to verify. The uploaded ID card image must match the country and id type you specify in this json object. To view the list of supported documents see supported ID types in the docs.
"id_info": { "country":"<country code e.g. KE>", "id_type":"<smile ID type keyword e.g. NATIONAL_ID>" } |
images | The images required for the document verification job. There are 2 image types that can be uploaded:
The images can be added as base64 encoded strings or the image files themselves can be added to the zip and the filename specified in the info.json. { "image_type_id": “varies based on image type and type of upload either base64 string or filename. Read more on image types in the FAQs in documentation”, "image": "", "file_name": "" } Depending on the image_type_id one of the other parameters (image or file_name) will be an empty string i.e. “” |
Info.json Example
As explained the zip file contains the info.json file only (if images are inline i.e. supplied as base64 encoded strings) or both an info.json file and image files (if the image files themselves are uploaded).
Example zip file and info.json when Images are Inline (i.e. Base64 Encoded Strings)
The zip file contains only the info.json file, the images are added inline in the info.json file as base64 encoded strings.
{
"package_information":
{
"apiVersion": {
"buildNumber": 0,
"majorVersion": 2,
"minorVersion": 0
}
},
"id_info":
{
"dob":"<dob in ID type specific format>",
"country":"<country code e.g. KE>",
"entered":true <job type 1> | false,
"id_type":"smile ID type keyword e.g. NATIONAL_ID",
"id_number":"The ID number e.g. 00000000",
"last_name":"Joe",
"first_name":"Leo",
"middle_name":"Doe"
},
"images": [
{
<Selfie image>
"image_type_id": 2,
"image": "VBORw0KGgoAAAANSUhEUgAAArg---truncated base64 string",
"file_name": ""
},
{
<liveness images, repeat this json blob for all 7-9 grayscale images>
"image_type_id": 6,
"image": "iVBORw0KGgoAAAANSUhEUgAAAjoAAAFaCAYA---truncated base64 string",
"file_name": ""
}
]
}
Example zip file and info.json when Images are uploaded as files

The zip contains info.json and the images as files
{
"package_information":
{
"apiVersion": {
"buildNumber": 0,
"majorVersion": 2,
"minorVersion": 0
}
},
"id_info":
{
"dob":" <dob in ID type specific format>",
"country":" <country code e.g. KE>",
"entered":true <job type 1> | false,
"id_type":"smile ID type keyword e.g. NATIONAL_ID",
"id_number":"The ID number e.g. 00000000",
"last_name":"Joe",
"first_name":"Leo",
"middle_name":"Doe"
},
"images": [
{
<Selfie image>
"image_type_id": 0,
"image": "",
"file_name": "Selfie.jpeg"
},
{
<liveness images, repeat this json blob for the other 6-8 grayscale images>
"image_type_id": 4,
"image": "",
"file_name": "1.jpg"
}
]
}
Action | Description |
ID lookup in ID authority database | ID information is queried in ID authority database |
Proof of life & spoof detection | Performed on user submitted selfie |
Selfie compares | If photo is available in ID authority database, Selfie is compared to photo on file else Selfie is compared to user submitted ID card photo |
For each successful Biometric KYC job, you will get two different responses to your callback:
- 1.Actions response which details the actions that were carried out on the job
- 2.ID information response which contains the information of the user retrieved from the ID authority
The size of the payload sent to your callback varies based on the size of image returned by the ID authority. We recommend your callback should accept payloads up to 1.5MB in size.
Name | Type | Description | Return Values |
ConfidenceValue | String | Smile ID’s confidence that the user should be registered. Values are between 0% - 100% | 0% - 100% |
PartnerParams.job_id | String | A unique reference defined by you to keep track of the job | |
PartnerParams.job_type | String | The type of job you performed. | “1” |
PartnerParams.user_id | String | A unique reference defined by you to keep track of the user | |
ResultCode | String | Numeric value of the job outcome. | |
ResultText | String | Textual value of the job outcome. Human readable value for the result. | |
SmileJobID | String | The Smile internal reference number for the job | |
Actions | Object | The JSON object contains the results of checks Smile ID performed on the job | |
{Human_Review_Compare | String | If the Smile ID system can not automatically decide on the face compares it will be reviewed by humans and the result will be displayed here | “Passed” “Failed” “Unable to Determine” “Not Applicable” |
Human_Review_Liveness_Check | String | If the Smile ID system can not automatically decide on the liveness of the user submitted liveness images, it will reviewed by humans. The result is displayed here | “Passed” |