---
title: Aadhaar eSign Using Face Auth Setup Guide
slug: contract360/aadhaar-esign-using-face-auth-setup-guide
docTags: 
createdAt: 2024-02-28T04:44:46.473Z
---

# Introduction

Signzy provides Aadhaar eSign by employing the signer's facial features as biometrics to authenticate identity and finalize the signing process. This involves utilizing the signer's face for verification during authentication.

:::hint{type="info"}
The utilization of Aadhaar eSign with Face Authentication is exclusive to a native mobile application on a mobile device. This functionality is not supported on desktops/laptops through web-based workflows. Additionally, it will not operate on a mobile device when accessed via a web-based workflow.
:::

:::hint{type="info"}
As of now, Aadhaar eSign with Face Authentication is compatible exclusively with Android mobile devices. iOS, Windows, or any other operating systems on mobile devices do not currently support this feature.
:::

If you require assistance in setting up the service or have any questions, please contact our helpdesk at [help@signzy.com](#) or reach out to your designated Customer Success Manager (CSM).

# Setup Guide

Here is a step-by-step process to use Aadhaar based eSign using Face Auth.&#x20;

**Step 1 -&#x20;**&#x55;tilize the "[Initiate Contract API](https://docs.signzy.com/api-marketplace/initiate-contract-api)" to create the contract. When employing the Aadhaar eSign Using Face Auth functionality, ensure to include `"signatureType": "AADHAARESIGN-FACEAUTH"` in the parameters.

**Step 2 -** Upon generation of the contract through the API, the output will include the Signer ID.

**Step 3** - Invoke Signzy's Aadhaar eSign SDK by utilizing this Signer ID.

# Signzy's Aadhaar eSign SDK Integration Steps&#x20;

E-sign is a versatile and powerful software development kit designed specifically for Android applications. By seamlessly integrating eSignSDK, developers can enhance their apps with the ability to facilitate electronic contract signings, ensuring both security and convenience.

To integrate the Android archive(.aar) file in any android application following steps need to be followed:

### Step 1&#x20;

Copy the **esignSDK-(env)-release.aar** file to app/libs/

![](https://lh7-us.googleusercontent.com/CQySGLbEcwjF7ynyyRCfz14NbxdPjImHc4FxicVaK2_O2o3uKeUZ9SwmTVyXuenDuD0jH_hR8a5EZY6-avt2of38jhBCU_3zkIPxpyvDp3KkOy2fZpuLSaKpuJRhzVC_9bGErNq0BgKop2ryR-XVrQ0)

:::hint{type="info"}
For testing in preproduction envrionment, use the **esignSDK-preproduction-release.aar**

For production envrionment, use the **esignSDK-production-release.aar**

Links for both the files are provided below. You can download them.
:::

::File{src="https://api.archbee.com/api/presign/w0YdjmC6Uxu0AJ6sPj9OT/n6hqkCU9vj1zYytEhD0cE_esignsdk-preproduction-release.aar" label="esignSDK-preproduction-release.aar"}

::File{src="https://api.archbee.com/api/presign/w0YdjmC6Uxu0AJ6sPj9OT/UsTic0OKdqfP-sHsoXBQ7_esignsdk-production-release.aar" label="esignSDK-production-release.aar"}

:::hint{type="info"}
You must install the FACE RD Mobile Application, provided by UIDAI, to capture facial data and perform face matching with UIDAI's records.

The FACE RD App for Preproduction can be downloaded from - [https://drive.google.com/file/d/1pkkn1iTNSnTZWY1U8EAEPt7IP6LRPGuP/view?usp=sharing](https://drive.google.com/file/d/1rijb_TkjhxYeS9O5QjiKH__k6oKsrRHf/view?usp=share_link)

If you are having issues while downloading this file, please get in touch with your CSM and they will provide you with the application.

The FACE RD App for Production can be downloaded from Google PlayStore - [https://play.google.com/store/apps/details?id=in.gov.uidai.facerd\&hl=en\_IN\&gl=US\&pli=1](https://play.google.com/store/apps/details?id=in.gov.uidai.facerd\&hl=en_IN\&gl=US\&pli=1)
:::

![](https://api.archbee.com/api/optimize/w0YdjmC6Uxu0AJ6sPj9OT/pSYdgQG7ws99_IjDuqCDx_image.png)

### Step 2

In **settings.gradle&#x20;**&#x61;dd the following to support jitpack.io

```java
dependencyResolutionManagement {
   repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
   repositories {
       //Other deps
       
       maven{ url 'https://jitpack.io' }
   }
}

```

### Step 3 - Import dependencies

In app level build.gradle add following dependencies&#x20;

```java
implementation(files("libs/esignSDK-(env).aar"))
Implementation "com.github.signzy:esign-sdk:1.0.0"
Implementation "androidx.databinding:viewbinding:8.2.1"
Implementation "com.squareup.retrofit2:retrofit:2.9.0"
Implementation "com.squareup.retrofit2:converter-gson:2.9.0"
Implementation "com.squareup.okhttp3:logging-interceptor:4.5.0"
Implementation "com.google.code.gson:gson:2.10.1"
Implementation "com.android.volley:volley:1.2.1"
Implementation "com.scottyab:rootbeer-lib:0.1.0"
```

### Step 4 - Invoke SDK

To invoke sdk we need to call the startActivityForResult function using SignzyEsignActivity

SDK needs to string params in input whose string constants are already there in **SignzyEsignActivity&#xA0;**

**SIGNZY\_SIGNER\_ID : It is the signer ID which you get in [Inititate Contract API](https://docs.signzy.com/api-marketplace/initiate-contract-api)**

**SIGNZY\_CONTRACT\_TOKEN: It is the same token which you use while using the OTS product**

```java
val appStartIntent = Intent(
   this,
   SignzyEsignActivity::class.java
).putExtra(SignzyEsignActivity.SIGNZY_SIGNER_ID, signerId)
   .putExtra(SignzyEsignActivity.SIGNZY_CONTRACT_TOKEN, token)
startActivityForResult(appStartIntent, SignzyEsignActivity.SIGNZY_REQUEST_CODE)
```

### Step 5: Watch For Result

On activity result can be setup 

String constants are available in **SignzyEsignActivity as&#xA0;**

 SIGNZY\_RESULT : this will give you the file URL of signed PDF 

SIGNZY\_ERROR\_MESSAGE : this will give the error message

SIGNZY\_ERROR\_CODE : this will give the error code

```java
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
   super.onActivityResult(requestCode, resultCode, data)
   if (requestCode == SignzyEsignActivity.SIGNZY_REQUEST_CODE) {
       if (resultCode == Activity.RESULT_OK) {
		//this is the signed file URL
           val file = data?.getStringExtra(SignzyEsignActivity.SIGNZY_RESULT)
           Toast.makeText(this,file,Toast.LENGTH_LONG).show()


       } else {
		// Incase ACTIVITY_CANCELED {errMsg & errCode is available}
           val errMsg = data?.getStringExtra(SignzyEsignActivity.SIGNZY_ERROR_MESSAGE)
           val errCode = data?.getStringExtra(SignzyEsignActivity.SIGNZY_ERROR_CODE)
           Toast.makeText(this,"$errCode :: $errMsg",Toast.LENGTH_LONG).show()




       }
   }
}

```

