Usage
How to use the Smile ID Web Integration
Steps
Fetch the web token from your server, when ready
Configure the web integration
Test the Integration
Fetch the Web Token from your server
Using the Web Token endpoint set up on your server, fetch a web token for the client
This can take the form of a click event on your web site or application.
Configure the Web Integration
With the web token, we can now configure our integration
The API for configuring the integration is as follows
token
string
Yes
token generated on the server side using the get_web_token
method in one of our server-to-server libraries
product
string
Yes
one of the Smile ID products.
"biometric_kyc"
"doc_verification
"authentication"
"basic_kyc"
"smartselfie"
"enhanced_kyc"
"enhanced_document_verification"
"e_signature"
document_ids
array
Yes (for e_signature
)
a list of previously uploaded document IDs
callback_url
string
Yes
a callback URL on your API server or wherever you prefer.
environment
string
Yes
one of "sandbox"
or "live"
partner_details
object
Yes
onSuccess
function
No
function to handle successful completion of the verification.
onError
*
function
No
function to handle errors with verification, called when end-user consent is denied
onClose
function
No
function to handle closing of the verification process
id_selection
**
object
No
{
"NG": ["BVN_MFA", "V_NIN"]
}
consent_required
***
object
Yes, for ID Types where user consent is required.
{
"NG": ["BVN", "NIN"]
}
document_capture_modes
array
No
list containing camera
or upload
or both
defaults to camera
allow_agent_mode
boolean
No
Whether to allow Agent Mode or not. If allowed, a button will be displayed allowing toggling between the back camera and front camera. If not allowed, only the front camera will be used. To use agent mode, the new design should be opted for by setting use_new_component: true
* - onError
function can take one argument of the shape { message: <message>, data: <object with details> }
** - id_selection
list is checked against those enabled for your partner account. this is limited in cases of basic_kyc
, enhanced_kyc
, enhanced_document_verification
, and biometric_kyc
.
If you pass only one country and id type in theid_selection
object, the id type selection screen will not be displayed in the web integration instance
*** - consent_required
list is subject to the ID Authority configuration. some ID Authorities require end-user consent, and that requirement overrides this setting
partner_details
configuration reference
partner_details
configuration referencename
string
Yes
Application Name
partner_id
string
Yes
Smile ID Partner ID
policy_url
string
Yes
URL to data privacy policy
logo_url
string
Yes
URL to App Logo (best in 1:1 aspect ratio)
theme_color
string
No
Test the Integration
After configuring the integration, you can walk through an example.
Theme Color
Last updated