Create session
On this page
If you have an API username and API password you can create an enrolment token. This token will be used to identify your user.
Create a new enrolment session
The API currently supports basic authentication. All endpoints require an Authentication header in the following form:
Authorization: 'Basic ' + Base64.encode(username + ':' + password)
Please note you should use Base64 encoding with padding!
Send a HTTP POST request to:
/api/v1/enrolment/initialize
The following parameters are used for requests and responses:
Parameter | Direction | Description |
---|---|---|
applicantForm | request | optional section to be provided if the applicant’s names and DOB were collected before session initialization, and these fields should be compared with the document fields during the session. |
firstName | request | applicant’s First Name (Given Name) |
lastName | request | applicant’s Last Name |
dateOfBirth | request | applicant’s Middle (Additional) Name |
skipIntegrityCheck | request | if applicant’s information to be compared with a document information and “Applicant integrity” TrustFactor to be created. Default value is ‘false’ |
sessionId | request | unique, short-lived GUID to be generated by the client to track specific sessions |
returnUrl | request | custom page to be displayed by the client solution after completion of the onboarding process, usually the progress bar should be displayed waiting for one of the available verification results: HIGH, MEDIUM, LOW (meaning and expected workflow described in Trust Factors section) |
externalId | request | optional text field (up to 512 characters) that can be used for filtering purposes later on. For example, it could be used to pass an external solution session ID or an external user ID. |
WebEnrolmentTheme | request | optional, enables the selection of a specific color and logo theme for web enrollment purposes |
accessToken | response | JWT access token to be used in the enrolment process during Enrolment |
sessionId | response | the same unique code sent in request, returned for the traceability |
webEnrolmentUrl | response | redirection URL, i.e. next step of the onboarding, contains full URL including a reference token (not an access token!) |
Request:
{
"sessionId": "ad90c821-e5ea-4385-be5b-4fc9f9ea24ee",
"returnUrl": "{A url where end user will be redirected after enrolment}",
"externalId": "53421526A",
"webEnrolmentTheme": "white",
"applicantForm": {
"firstName": "John",
"lastName": "Doe",
"additionalNames": "Michael",
"dateOfBirth": "2004-07-09",
"skipIntegrityCheck": false
}
}
Response:
{
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uSWQiOiJhZDkwYzgyMS1lNWVhLTQzODUtYmU1Yi00ZmM5ZjllYTI0ZWU
iLCJjdXN0b21lciI6IjEyZjUwMjM1LWFkNmYtNDVmNi1iOGM1LTE2ZGM1N2QwOTI1MyIsIm5iZiI6MTY0Mzk3NDMyMywiZXhwIjoxNjQzOTc3OTIzfQ.t5zU
PHZjpo-q3Rl5ZibyKSaBXAdItuCRdTBMS2JW8gQ",
"sessionId": "ad90c821-e5ea-4385-be5b-4fc9f9ea24ee"
"webEnrolmentUrl": "https://<domain name>/web-enrolment/?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uSWQiOiJhZ
DkwYzgyMS1lNWVhLTQzODUtYmU1Yi00ZmM5ZjllYTI0ZWU
iLCJjdXN0b21lciI6IjEyZjUwMjM1LWFkNmYtNDVmNi1iOGM1LTE2ZGM1N2QwOTI1MyIsIm5iZiI6MTY0Mzk3NDMyMywiZXhwIjoxNjQzOTc3OTIzfQ.t5zU"
}
Example:
curl -X POST "
/api/v1/enrolment/initialize" -H "accept: text/plain" -H
"Authorization: Basic aW5ub3ZhdHJpY3M6aW5ub3ZhdHJpY3M=" -H "Content-Type: application/json" -d "{\"sessionId\":\"ad90c82
1-e5ea-4385-be5b-4fc9f9ea24ee\",\"returnUrl\":\"your url\"}"