canonical: https://jentic.com/apis/digitallocker.gov.in/digitallocker-authorized-partner-api-specification

# Digitallocker Authorized Partner API Specification

The DigiLocker Authorized Partner API gives accredited applications OAuth-mediated access to documents stored in a citizen's DigiLocker account, India's national digital document wallet. Partners can pull issued documents from government issuers, verify Aadhaar-linked identity attributes, upload self-uploaded files, and manage signups and account metadata. The 22 endpoints cover the full authorization flow, file retrieval, issuer and document type discovery, and OTP-based DigiLocker account creation.

## For AI agents

Retrieve government-issued documents, Aadhaar-verified identity data, and uploaded files from a citizen's DigiLocker account after OAuth consent. Useful for KYC, e-signing, and verified credential retrieval workflows.

## Scope

Does not handle Aadhaar authentication itself, e-Sign signature creation, or non-Indian government documents - use for retrieving and depositing files in a citizen's DigiLocker account only.

## Capabilities

- Initiate OAuth 2.0 authorization codes that route citizens through DigiLocker consent before returning a partner access token
- Pull issued documents such as PAN, driving license, and education certificates directly from government issuers via `/oauth2/1/pull/doctype`
- Fetch a list of issued and self-uploaded files for the authorized user with `/oauth2/1/files/issued` and `/oauth2/1/files`
- Upload partner-generated documents into a user's DigiLocker self-uploaded section with `/oauth2/1/file/upload`
- Discover supported issuers, document types, and pull parameters before requesting documents
- Sign up new DigiLocker users via Aadhaar OTP verification and revoke previously issued tokens

## Use cases

### Digital KYC Onboarding for Indian Financial Services

Banks, NBFCs, and fintechs in India can replace paper KYC by pulling Aadhaar, PAN, and address proof documents directly from a customer's DigiLocker after OAuth consent. The Authorized Partner API returns government-signed XML or PDF documents that satisfy RBI-recognized digital KYC requirements, removing the need for branch visits or scanned uploads. Most onboarding flows complete in under two minutes once consent is granted.

Example prompt: Initiate DigiLocker OAuth, exchange the auth code for an access token, then call `/oauth2/1/pull/doctype` to fetch the user's PAN card and return the signed document URI.

### Verified Educational Credential Retrieval

Recruiters, edtech platforms, and scholarship verifiers can fetch authenticated education certificates from issuers such as CBSE and state boards through the partner API. The `/oauth2/1/pull/issuers` and `/oauth2/1/pull/doctype` endpoints discover available certificates before retrieval, eliminating manual document upload and forgery checks. Verified credentials arrive as government-signed files with a stable URI for re-fetching.

Example prompt: List supported issuers via `/oauth2/1/pull/issuers` filtered for education boards, then pull the user's Class XII certificate and return its signed file URI.

### Signed Document Storage for Loan and Insurance Agreements

Lenders and insurers can deposit executed contracts, policy documents, and disbursement letters into the customer's DigiLocker via `/oauth2/1/file/upload.` The customer retains permanent access through their DigiLocker account, and the partner can re-fetch the file by URI for compliance archives. This removes email-based document delivery and provides a tamper-evident citizen-owned vault.

Example prompt: Upload a signed loan agreement PDF to the user's DigiLocker self-uploaded section using `/oauth2/1/file/upload` and store the returned URI for later retrieval.

### AI Agent Document Retrieval for Indian Services

AI agents handling Indian financial, legal, or HR workflows can access a citizen's verified documents through Jentic without managing OAuth callback URLs, custom key headers, or token exchange directly. Jentic exposes the DigiLocker pull and file operations as searchable tools, with the OAuth flow brokered through your Jentic One instance credential isolation. Agents focus on the workflow logic rather than DigiLocker-specific auth plumbing.

Example prompt: Search Jentic for 'fetch document from DigiLocker', load the pull-doctype operation schema, and execute it to retrieve the user's Aadhaar card after OAuth consent.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/oauth2/1/authorize` | Start the OAuth 2.0 authorization code flow |
| POST | `/oauth2/1/code` | Exchange authorization code for access token |
| GET | `/oauth2/1/files/issued` | List documents issued to the authenticated user |
| GET | `/oauth2/1/file/{uri}` | Retrieve a specific document by URI |
| POST | `/oauth2/1/pull/doctype` | Pull an issued document by document type |
| POST | `/oauth2/1/pull/issuers` | List supported issuers for document pulling |
| POST | `/oauth2/1/file/upload` | Upload a file to the user's self-uploaded folder |

## Key resources

- **Authorization** — OAuth 2.0 authorize, code exchange, and token revocation endpoints
- **File APIs** — Upload, retrieve, and list issued and self-uploaded files in the user's DigiLocker
- **Pull APIs** — Fetch issued documents from government issuers by doctype and parameters
- **DigiLocker Sign up APIs** — Aadhaar OTP-based signup for new DigiLocker users
- **Account Detail API** — Verify and retrieve details about the authenticated DigiLocker account
- **DigiLocker Meta APIs** — List supported issuers, document types, and pull parameters

## Why Jentic

- **Setup:** Wiring DigiLocker by hand means running its citizen OAuth2 authorize-and-code exchange, carrying the partner API key and bearer tokens, and pointing at the betaapi.digitallocker.gov.in host yourself. Through Jentic you install once, import the Authorized Partner API from the API Directory, store the partner credentials once, and your agent calls it.
- **Permission scoping:** DigiLocker operations act on the citizen's authorized account, so scope your agent to the operations it needs, such as listing issued files or pulling a document by type. You choose the operations it may call, so uploading a file to the account is not included unless you add it.
- **Credential handling:** Your DigiLocker partner credentials and the citizen's OAuth tokens are stored once, encrypted, by your own Jentic One instance and injected at execution time. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'fetch a PAN card from DigiLocker' or 'list issued documents', and Jentic returns the matching DigiLocker operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Onfido** — Global identity verification with document and biometric checks
- **Veriff** — Identity verification with liveness and document scanning across 230+ countries
- **Persona** — Configurable KYC and identity orchestration platform

## FAQ

### What authentication does the DigiLocker Authorized Partner API use?

It uses OAuth 2.0 authorization code flow combined with two custom API key headers (Customkey1 and Customkey2) and a bearer token on subsequent calls. Partners must be onboarded by Meity to receive client credentials. Through Jentic, these credentials are stored encrypted in your Jentic One instance and the agent receives only scoped access to call DigiLocker operations.

### Can I pull a user's Aadhaar or PAN card with the DigiLocker Authorized Partner API?

Yes, after the user grants OAuth consent, partners call `/oauth2/1/pull/doctype` with the relevant doctype identifier (such as PANCR for PAN or ADHAR for Aadhaar) to fetch the government-signed document. Use `/oauth2/1/pull/issuers` and `/oauth2/1/pull/parameters` first to confirm the exact identifiers and required parameters for the issuer.

### What are the rate limits for the DigiLocker Authorized Partner API?

Rate limits are not published in the OpenAPI spec; they are negotiated per partner during onboarding with Meity and DigiLocker operations. Production partners typically receive higher quotas than sandbox accounts. Contact the DigiLocker partner team via the developer portal for your specific quota.

### How do I retrieve an issued document with the DigiLocker API through Jentic?

Search Jentic for 'pull document from DigiLocker', load the schema for the `/oauth2/1/pull/doctype` operation, and execute it with the user's access token, doctype, and any required pull parameters. Jentic returns the signed document URI which can then be fetched via `/oauth2/1/file/{uri}.`

### Can I upload partner-generated documents into a user's DigiLocker?

Yes, `/oauth2/1/file/upload` places a file into the user's self-uploaded folder once the user has authorized the partner via OAuth. The endpoint returns a stable URI you can store for later retrieval through `/oauth2/1/file/{uri}.` This is commonly used for loan agreements and policy documents.

### Is the DigiLocker Authorized Partner API free?

Access is free for accredited partners but requires Meity onboarding and signing of the DigiLocker Partner Agreement. There is no per-call charge published, though partners must comply with usage policies and data protection requirements set out in the agreement.

### Can I limit what my agent is allowed to do with the DigiLocker Authorized Partner API?

Yes. Because you run Jentic One yourself, your own rules decide which DigiLocker operations and credentials the agent may use, so you can grant only what a given workflow needs, such as listing issued files or pulling a document by type. Since you choose the operations it may call, higher-impact actions like uploading a file to the citizen's self-uploaded folder are not available to the agent unless you add them. Your partner credentials and the citizen's OAuth tokens stay isolated in your instance and are injected at execution time, never entering the agent's prompt or context.
