Skip to the content.

[DEPRECATED]

This project won’t work anymore as aadhaar offline-kyc website deprecated(https://resident.uidai.gov.in/offline-kyc).

Aadhaar Paperless Offline e-KYC APIs

Aadhaar Paperless Offline e-KYC is a secure and shareable document which can be used by any Aadhaar holder for offline verification of identification.(https://resident.uidai.gov.in/offline-kyc)

Postman Link: https://www.getpostman.com/collections/ce378a9aa6040b0f55e0

Introduction

This server exposing 3 APIs to download a ZIP file containing the Resident’s Paperless Offline eKYC from UIDAI website.

These APIs depend on https://resident.uidai.gov.in/offline-kyc website. By using these APIs client can expose their own interface to user.

How To Run Server

go run cmd/server/main.go

OR

go run cmd/server/main.go --conf configs/local.yml 

This server exposing 2 type of API interfaces(gRPC and REST). Default port for gRPC server is 4444 and REST is 3333. (configs/default.yml).

This can be changed by adding environment specific configs.

Example:

Add configs/local.yml and run go run cmd/server/main.go --conf configs/local.yml

# sample config
server:
  grpcPort: 4444
  httpPort: 3333
  host: "0.0.0.0"

logger:
  outputPath: "stdout"
  level: "info"
  disableStackTrace: true

accessLogger:
  outputPath: "stdout"
  level: "error"
  disableStackTrace: true

aadhaarCacheStore:
  type: redis # default memory
  redis:
    host: "localhost:6379"
    password: ""
    db: 0


Use as a package Go Reference

import "github.com/aaabhilash97/aadhaar-paperless-offline-ekyc-apis/pkg/aadhaarapi"

API Details

If client wants to use gRPC interface, client can generate client code from api/proto using protobuf compiler.

REST API Details

Postman Link: https://www.getpostman.com/collections/ce378a9aa6040b0f55e0

Get Captcha

To fetch captcha and session id from UIDAI.

Verify Captcha

Once captcha fetched, need to call this API with aadhaar number(uid_no) and captcha(security_code).

On success user will receive an OTP on phone number associated with aadhaar.

Verify OTP and Fetch aadhaar details

Call this API with OTP received to download zip file from UIDAI and fetch details.

Response Status Codes