Document Fetch and Verification — DigiLocker

Created by Rajatha B M, Modified on Fri, 27 Mar at 2:33 PM by Rajatha B M

What does this API do?

The DigiLocker API enables lenders to fetch verified digital documents directly from a citizen's DigiLocker account, eliminating the need for physical document submission. Organisations registered on DigiLocker can retrieve government-issued certificates — such as Aadhaar, PAN, driving licence, vehicle registration, educational marksheets, Udyam Certificate, and Passport Verification Report — in Base64-encoded XML or PDF format. The API also supports the Entity Locker flow for business document retrieval.

Who can use it?

Any lender or financial institution that has been onboarded to the ULI Platform and has subscribed to the DigiLocker service in the Platform Developer Portal.

Prerequisites

Complete all common platform prerequisites as described in Getting Started with ULI Platform APIs.

In addition, the following is specific to this API:

  • DigiLocker Token: The lender must have an active DigiLocker account and generate a DigiLocker bearer access token (x-sp-token) prior to calling this API. This is distinct from the ULI Platform JWT token.
  • DigiLocker Service Subscription: Subscribe to the DigiLocker service in the Platform Developer Portal (separately for Sandbox and Production). Refer to Section 10 of the SOP for Lender Onboarding for subscription steps.

What are the API endpoints?

EnvironmentURL
Sandboxhttps://extgw.nonprod.rbihub.io/digilocker/issued-documents/1.3/en
Productionhttps://extgw.api.rbihub.io/digilocker/issued-documents/1.3/en

HTTP method: GET

URL path follows the convention: /{serviceName}/{ver}/{lang}

URL ParameterDescriptionValue
serviceNameUnique name of the servicedigilocker/issued-documents
verCurrent version of the API1.3
langLanguage for the response (ISO 639-1 code)en

What headers are required?

HeaderDescriptionRemarks
AuthenticationJWT token generated by the authentication serverRefer to the Authentication and Authorization API specification
x-sp-tokenBearer access token to call DigiLocker APIsAlphanumeric; obtained separately from DigiLocker
scopeDocument type(s) to retrieveCase-insensitive. See supported scope values below
client-idBase64-encoded Client ID issued by the platform at registrationRequired
providerService provider code per MDDS standardsUse 110 for DigiLocker
tsRequest timestamp in ISO-8601 format (yyyy-MM-ddTHH:mm:ssZ)Required
txncodeUnique alphanumeric transaction code provided by the lenderRequired
consent-idReference number of the consent artifact in the lender's applicationAlphanumeric; 6–32 characters
serviceFlow selector: DigiLocker or EntityLockerOptional; defaults to DigiLocker. Use DL for DigiLocker, EL for EntityLocker
file-formatFormat for the fetched document (DigiLocker flow only)Optional; case-insensitive; defaults to XML. Also accepts PDF
api-key24-character alphanumeric key issued by the platformOptional; reserved for future use
x-env-routeRequired to route requests to the sandbox environmentSet to /sb for Sandbox only; omit for Production

Supported scope values:

Scope CodeDocument Type
ADHARAadhaar Card (XML format only)
PANCRPAN Verification Record
DRVLCDriving Licence
RVCERVehicle Registration
SSCERClass X Marksheet
SSMGRClass X Migration Certificate
HSCERClass XII Marksheet
HSMGRClass XII Migration Certificate
UDCERUdyam Certificate
OPNCREntity Locker PAN Verification Record
PSPRTPassport Verification Report

What is the request body?

This API uses the HTTP GET method. All inputs are passed as HTTP headers — there is no request body.

What do the response fields mean?

FieldDescription
result.errcodeE000 on success; a relevant error code on failure
result.statussuccess or fail
result.infoDescriptive message, e.g. "Fetched issued documents successfully"
dataObject keyed by scope code (e.g. ADHAR), containing the Base64-encoded XML or PDF document
signatureDigital signature hash of the data field
meta.txncodeUnique transaction code provided by the lender
meta.verVersion of the JSON response template in use
meta.tsRequest initiation timestamp in ISO-8601 format
hmacSHA-256 hash of the data field for integrity verification
publickeyPlatform public key for source verification
sig-algoAlgorithm used for signing, e.g. SHA256withECDSA

Sample response:

{
  "result": {
    "errcode": "E000",
    "status": "success",
    "info": "Fetched issued documents successfully"
  },
  "data": {
    "ADHAR": "<Base64 encoded XML/PDF response>"
  },
  "meta": {
    "txncode": "Test123",
    "ver": "1.3",
    "ts": "2023-09-20T23:02:15+0530"
  }
}

What are the error codes?

For the full list of platform-wide error codes, refer to the Latest Platform Error Code document. The following are DigiLocker-specific error codes:

Error CodeDescription
E510Invalid scope value
E741Invalid token or token expired
E829Invalid file format
E851x-jws-signature header is missing
E852client_api_key header is missing
E853Authentication failed at provider

Who do I contact for support?

If you encounter an issue, email support@rbihub.in with the following details:

  • Subject: DigiLocker API Error
  • Platform Service Name: DigiLocker
  • Platform Environment: Sandbox or Production
  • Service Provider code: 110
  • Request payload (headers) sent to the platform
  • Error code and error message received
  • Prerequisites status: IP Whitelisting, URL Whitelisting, Service Subscription, Token Generation
  • Screenshot or log of the error (as attachment)

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article