The onboarding procedure allows to register new user record that includes:

  • image of the document with photo (like passport, driving license or ID card)
  • live selfie movie of the same person (same face), with liveness check
  • login and password to access the record.

The fill and up to date documentation is available here.

Onboarding is performed in following steps:

Create onboarding object instance

val onb = FFLOnboarding(api, 0.9)

first argument is an API object instance that was described above. The second argument is the face match threshold, the parameter that tells the system how much the photo on the ID document must resemble the one in selfie movie. Reasonable values lie in 0.75..0.9 range, consult NTEH server software for more information.

Add document photo

The document photo is a .jpg file, it must contain clearly visible face image. To add a document photo:

var result = onb.addDocument(docJpegFile)

where docJpegFile is a string with a valid path to a jpeg file.

If everything is OK, the result should be FFLOnboarding.Result.OK. Other values represent various error conditions and are described here.

If everything is OK, it is possible to add live selfie.

Add selfie video

Note that to add video, you must first successfully add the document. Without it adding video will fail. The selfie video is a short mpeg movie file, preferable obtained using provided android library provided. Otherwise please consult FFL server documentation for current requirements for selfie movie. The movie should be recorded to a file to be processed. When everything is ready, add it to the onboarding instance:

result = onb.addSelfieMovie(mp4File)

where mp4file is a string containing the path to a valid mp4 video of freshly captured registering user face. Note that the face should math one registered in the document from the previous step.

Again, result should be FFLOnboarding.Result.OK. Other values represent various error conditions and are described here.

Create account (login and password)

When you have onboarding instance with successfully added document and selfie, it is possible to finalize onboarding procedure by providing login and password to create user account. Note that it will not work if any of above was not done. To create user record call:

result = onb.createDossier(login,password)

Where login should be unique string. If the login is already in use, it will return pLoginExists](https://kb.universablockchain.com/system/static/fflapi/libfflapi/net.sergeych.libfflapi/-f-f-l-onboarding/-result/-login-exists/index.html) error and this step should be repeated with some other login value.

if result == FFLOnboarding.Result.OK then onboarding is successfully done.