Reimagine the way your users authenticate their information with eKYC.
Android API 21+
This Quick Start guide will get you up and performing user authentication as quickly as possible. All steps described in this guide are required for the integration.
This guide closely follows the eKYC-Sample app in the Samples folder of this repository. We highly recommend you try to run the sample app. The sample app should compile and run on your device.
The source code of the sample app can be used as the reference during the integration.
Comming soon.
-
Download latest release Download .zip or .tar.gz file starting with eKYC.
-
Extract the content of zip file to your local maven directory (~/.m2/repository/{HERE})
-
Add
mavenLocal()repository to your project build.allprojects { repositories { google() mavenCentral() mavenLocal() } } -
Add SDK dependency to your app build.gradle.
dependencies { /* Other dependency */ implementation('co.nilin.sdk:ekyc:1.0.0@aar') { transitive = true } } -
Add these rules to the app module proguard
-keep class co.nilin.** { *;} -keepclassmembers class ** { @org.greenrobot.eventbus.Subscribe <methods>; }
1. Initialize SDK client
To initialize the SDK client, you need a server domain address and a API key.
val sdk: EkycClient = EkycSdk.getClient(
server = KYC_SERVER_ADDRESS,
key = YOUR_API_KEY
)
2. Start process
The eKYC process has two different flow. One flow for those who have a national card and another for those who have a reference code.
fun start(phoneNumber: String) {
sdk.ekycWithCardIntent(this, phoneNumber)
startActivityForResult(intent, REQUEST_CODE)
}
3. Get result of eKYC process
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
if (requestCode == REQUEST_CODE) {
val kycToken = data?.getStringExtra("token")
if (kycToken.isNullOrBlank()) {
// Process failed
} else {
// The process was successfully Done
}
}
}
A valid license key is required to initalize SDK. You can generate a free trial license key, after you register, at Contact us.
Complete API reference can be found here.
For any other questions, feel free to contact us at info@nilin.co.