---
type: "product"
title: "DigiLocker API India | Consent Based Secure Digital Document Access"
description: "Integrate DigiLocker API to access and verify user documents securely through consent-based digital workflows."
category: "verification"
canonical: "https://eps.eko.in/products/digilocker-api"
---


> **Canonical URL:** https://eps.eko.in/products/digilocker-api
> This is a machine-readable Markdown version of the page for AI agents and LLMs. The primary (HTML) version lives at the canonical URL above.

# DigiLocker API for Consent-Based KYC & Document Verification

Fetch and verify user-consented digital documents such as Aadhaar, PAN, driving licence, and other DigiLocker-issued records through secure, paperless API workflows for onboarding, lending, and compliance.

_Secure digital document verification_

To get started, fill the form at https://eps.eko.in/signup (with your name, mobile number and email) or call us at +919513181707

## Overview

The DigiLocker API enables businesses to fetch and verify user documents digitally with explicit consent. It eliminates manual document collection, reduces fraud, and accelerates onboarding through trusted digital records.

## Features

- Consent-Based Document Access: Fetch documents only after explicit user consent, ensuring transparency and trust.
- Digital Document Retrieval: Access verified digital documents without physical copies.
- Automation Ready: Integrates seamlessly into digital onboarding and compliance systems.
- Scalable Architecture: Designed to handle high-volume document access reliably.

## Who Should Use This

- Banks and NBFCs
- Fintech and lending platforms
- Enterprises with digital onboarding
- Platforms requiring document verification

## Use Cases

- Digital KYC and onboarding
- Loan and credit processing
- Customer identity verification
- Compliance and due diligence workflows

## What Can You Verify With DigiLocker Integration API?

- **DigiLocker URL** — DigiLocker redirect URL. Present this URL to the customer to begin document authorisation.
- **Document Type** — Type of document retrieved (e.g. AADHAAR).
- **Name** — Full name as per the verified document.
- **Date of Birth** — Date of birth from the verified document.
- **Gender** — Gender as per document: M, F, or T.
- **Masked Aadhaar** — Aadhaar number with first 8 digits masked.
- **Address** — Residential address from the verified Aadhaar.
- **House** — House or flat number.
- **Street** — Street or locality name.
- **Village Or City** — Village or city.
- **District** — District.
- **State** — State.
- **Pincode** — 6-digit postal code.
- **Photo** — Base64-encoded photograph from the Aadhaar document.
- **Verification Status** — Overall DigiLocker verification status: SUCCESS or PENDING.
- **User Details** — Identity details of the individual who completed the DigiLocker consent flow.
- **Eaadhaar** — Indicates whether the individual's e-Aadhaar is available in DigiLocker.
- **Document Consent** — Consent status objects per requested document type. Indicates which documents the user approved for sharing.

## API Preview — Create DigiLocker URL

`POST /tools/kyc/digilocker`

### Example inputs

| Field | Value |
| --- | --- |
| Document Requested | ["AADHAAR"] |
| Redirection URL | https://yourapp.com/kyc/callback |

### Example outputs

| Field | Value |
| --- | --- |
| Reference Id | 7483920 |
| DigiLocker URL | https://digilocker.gov.in/auth?session_id=abc123xyz |

## API Preview — Get DigiLocker Document

`POST /tools/kyc/digilocker/document`

### Example inputs

| Field | Value |
| --- | --- |
| Document Type | ["AADHAAR"] |
| Verification Id | vrf_digilocker_abc123 |
| Reference Id | 7483920 |

### Example outputs

| Field | Value |
| --- | --- |
| Document Type | AADHAAR |
| Name | Vikram Singh |
| Date of Birth | 12-11-1987 |
| Gender | M |
| Masked Aadhaar | XXXX-XXXX-2345 |
| House | 15B |
| Street | Nehru Street |
| Village Or City | Chennai |
| District | Chennai |
| State | Tamil Nadu |
| Pincode | 600001 |
| Photo | /9j/4AAQSkZJRgABAQ... |
| Verification Status | SUCCESS |

## API Preview — DigiLocker Verification Status

`GET /tools/kyc/digilocker/status`

### Example inputs

| Field | Value |
| --- | --- |
| Reference Id | 12345 |

### Example outputs

| Field | Value |
| --- | --- |
| Name | Rahul Sharma |
| Dob | 15-08-1990 |
| Gender | M |
| Eaadhaar | Y |
| Document Consent | [{"document_type":"AADHAAR","consent":"Y"}] |

## Integration Steps

1. **[Sign Up](/console)** — Sign up in minutes with your mobile number (OTP verify).
2. **Verify Identity** — Complete your basic KYC with PAN and address details to verify your identity.
3. **Test APIs Live** — Load funds into your wallet and test the verification APIs live — evaluate before you integrate.
4. **[Integrate with AI](/ai)** — Ready to build? Visit our AI hub for free plugins & tools to integrate faster.
5. **Go Live** — Start accessing digital documents in production.

## FAQs

### Does the DigiLocker API use OTP or redirect-based consent?
The DigiLocker API uses a redirect-based consent mechanism. The user may authenticate through DigiLocker using the supported login or OTP process and then approve document sharing. Your application receives the verification result through the configured callback or API response.

### Is DigiLocker access consent-based?
Yes, documents are fetched only after explicit user consent, ensuring full transparency.

### What documents can be accessed?
You can access government-issued digital documents like Aadhaar, PAN, driving license, and more through DigiLocker.

### Does it eliminate physical document collection?
Yes, the API enables fully paperless document verification, eliminating manual collection.

### How do I get started?
Four steps: **sign up** at the [developer console page](/console), verify your identity with PAN and address details, load your wallet to test the APIs live, then integrate and go live. Sandbox credentials are issued immediately — you can call your first endpoint before any paperwork clears.

### What is EPS?
**EPS (Eko Platform Services)** is the technology arm of Eko — the developer tools, AI tooling and APIs that power modern fintech integration, from money transfer and AePS to identity verification.

### What are the different ways to integrate with Eko EPS?
Three paths, pick whichever suits your stack:

- Call the **REST APIs** directly.
- Use our official **Node.js, Python, PHP, Go or Java SDKs** to skip request-signing boilerplate.
- Let an **AI coding agent** build it via our [MCP server and agent skills](/ai#install).

For multi-step flows (onboard a sender, *then* transfer) start from a [transaction-flow recipe](/recipe) rather than wiring single endpoints together yourself.

### How does API authentication work?
Each request carries your static `developer_key` header plus a per-request `secret-key` header — an **HMAC-SHA256** signature of the current timestamp, keyed by your access key. The access key itself is **never sent over the wire**. You receive UAT keys on signup and production keys after KYC.

The [How Authentication Works](/docs/how-auth-works) guide has the full signing recipe in five languages plus an **in-browser playground** that generates and verifies a real `secret-key` against your own access key.

### Why does my API call return 401 Unauthorized?
Authentication failed. For the known causes, the response body's `status` names the check that failed:

- `2483` — The developer_key is wrong.
- `2484` — The secret-key (signature) is wrong.
- `2485` — The secret-key-timestamp is more than 2 minutes older or newer than the server clock, or was reused from an earlier request.
- `2486` — The secret-key-timestamp is not in milliseconds (13 digits) — often seconds (10 digits).
- `2487` — The secret-key or secret-key-timestamp header is missing.

If your signature checks out in the [secret-key playground](/docs/how-auth-works#try-it-secret-key-playground) and you still get a `401`, make sure the base URL matches your keys (UAT vs production) and, in production, that your server's IP is whitelisted.

### Is there a sandbox environment for testing?
Yes. A full **sandbox** is available immediately on signup — test your integration end-to-end before going live, no commitment required. For offline work you can also run our [mock server](/ai#artifacts) (`npx -y @ekoindia/eps-mock-server`) and get canned responses with no network calls at all.

### What are the sandbox and production base URLs?
Sandbox and production share the same paths and differ **only** by base URL:

- UAT / Sandbox — `https://staging.eko.in/ekoapi/v3`
- Production — `https://api.eko.in/ekoicici/v3`

A common cause of failures is calling the sandbox URL with live credentials, or vice-versa — **make sure the base URL matches the keys you are using**.

### Do I need to whitelist my server IP?
It's optional. **IP whitelisting** is available for **production** access as an extra layer of security — share your **static public (server) IP** with us and we'll whitelist it.

### Can an AI coding agent build the integration for me?
Yes — that is the fastest path. Point your agent (Claude Code, Codex, Cursor, Copilot, …) at our **MCP server** and it can look up any endpoint, generate correctly-signed requests, and scaffold the integration in your own stack. Install it in [one step from the AI hub](/ai#install), or start from a [ready-made prompt](/ai#quick-start).

We also publish an **OpenAPI 3.1 spec**, a **Postman collection** and per-agent **context packs** (`AGENTS.md`, `CLAUDE.md`, `.cursorrules`) so an agent has the ground truth instead of guessing.

### What response times can I expect?
Most verification APIs return in **real time with sub-second responses**, and 99th-percentile latency stays under two seconds across verification endpoints. Transaction APIs (DMT, AePS, BBPS) respond within seconds.

### Can the API handle high volumes?
Yes. The API is designed to handle **large-scale volumes** reliably without performance degradation.

### How is API usage billed?
Usage is billed **per successful API call** with no minimum commitment. Volume-based pricing tiers are available — see the [pricing calculator](/pricing) for indicative rates, or contact our team for a custom quote.

## API Endpoints

- [Create DigiLocker URL](https://eps.eko.in/docs/digilocker-create-url.md) (POST)
- [Get DigiLocker Document](https://eps.eko.in/docs/digilocker-get-document.md) (POST)

## API Documentation

- [Full developer docs](https://eps.eko.in/docs/digilocker-create-url)

## Related Products

- [Mobile/OTP Verification](https://eps.eko.in/products/mobile-otp-verification-api): Send, verify & validate mobile OTPs with a signed proof token ([markdown](https://eps.eko.in/products/mobile-otp-verification-api.md))
- [PAN Verification](https://eps.eko.in/products/pan-verification-api): Full PAN identity fetch in <2 seconds ([markdown](https://eps.eko.in/products/pan-verification-api.md))
- [Bank Account Verification](https://eps.eko.in/products/bank-verification-api): Penny-drop bank account validation ([markdown](https://eps.eko.in/products/bank-verification-api.md))
- [GST Verification](https://eps.eko.in/products/gst-verification-api): GSTIN lookup & filing status ([markdown](https://eps.eko.in/products/gst-verification-api.md))
- [UPI ID (VPA) Verification](https://eps.eko.in/products/upi-verification-api): Validate UPI ID (VPA) in real time ([markdown](https://eps.eko.in/products/upi-verification-api.md))

- [Site index](https://eps.eko.in/index.md): Full list of API products, industries, and solution packs
