ID Verification

View the package on Pypi and the open source code on Github.

Installation

pip install smile-id-core

Import the necessary classes

from smile_id_core import IdApi,ServerError

ID Api Class

submit_job method

try:
connection = IdApi("< String partner_id >", "< String decoded_version_of_api_key >", "< Integer 0 | | 1 >")
response = connection.submit_job(partner_params, id_info_params)
except ValueError:
# some of your params entered for a job are not valid or missing
print("handle ValueError")
except ServerError:
# Server returned an error
print("handle ServerErrorServerError")

Where

partner_id = '<Your 3 digit partner ID>'
api_key = '<Your base64 encoded API key>' # Download your API key from the Smile Identity portal
sid_server = '0' # Use '0' for the sandbox server, use '1' for production server
# Create required tracking parameters
partner_params = {
"job_id": '<Your unique job ID here',
"user_id": '<Your unique ID for the user here>',
"job_type": 5
}
# Create ID info
id_info = {
"first_name": '<name>',
"last_name": '<surname>',
"country": '<country code>',
"id_type": '<id type>',
"id_number": '<valid id number>',
"dob": '<date of birth>', # yyyy-mm-dd
"phone_number": '<phone number>'
}

Your response will return a Response Class with JSON containing the below:

{
"JSONVersion":"1.0.0",
"SmileJobID":"0000001105",
"PartnerParams":{
"user_id":"T6yzdOezucdsPrY0QG9LYNDGOrC",
"job_id":"FS1kd1dd15JUpd87gTBDapvFxv0",
"job_type":5
},
"ResultType":"ID Verification",
"ResultText":"ID Number Validated",
"ResultCode":"1012",
"IsFinalResult":"true",
"Actions":{
"Verify_ID_Number":"Verified",
"Return_Personal_Info":"Returned"
},
"Country":"NG",
"IDType":"DRIVERS_LICENSE",
"IDNumber":"ABC000000000",
"ExpirationDate":"2017-10-28",
"FullName":"John Doe",
"DOB":"1900-09-20",
"Photo":"SomeBase64Image",
"sec_key":"pjxsx...",
"timestamp":1570698930193
}

ID API Result Codes:

Code

Description

1012

Success

1013

Invalid ID

1014

Unsupported ID Type and/or Country

1015

Error - Queried Database Unavailable

1016

Product Activation Require