DigiLocker Integration: A step by step guide for developers

DigiLocker is a service provided by the Indian Government, allowing issuing authorities to directly issue identity documents such as Aadhaar, PAN, Driving License, and Registration Certificates into a Users DigiLocker account.

DigiLocker exists in the form of a mobile app that can be freely downloaded by Indian citizens who have an Aadhaar and a mobile linked to their Aadhaar. Once linked to Aadhaar, citizens can easily retrieve the required documents into their own DigiLocker wallet. The verified documents stored in your app can then be easily shared with service providers, including banks, insurance companies, and lenders, with your full consent.

Please note that this document is intended for developers looking to integrate DigiLocker APIs into existing web or mobile apps. Therefore, the document is fairly technical and assumes that the reader has some knowledge of API integration. The API flow consists of a series of steps that must be implemented in the exact order specified by DigiLocker. We have outlined the high-level steps corresponding to the APIs for your easy understanding. It’s essential to carefully follow all of these steps, without skipping any, in order to retrieve the desired documents from the DigiLocker wallet.

DigiLocker Signup

To get started, the API will allow your user to sign up or sign in to DigiLocker. Please be aware that if a user already possesses a DigiLocker account, they will be prompted to sign in by entering their PIN. If the user from whom you wish to retrieve documents does not have an account, the API will automatically initiate the sign-up process using the pre-built screens provided by DigiLocker. In this scenario, the user will be required to input their Aadhaar Number and OTP during the sign-in process. Furthermore, users have the option to reset their PIN if they can’t remember it during the sign-in procedure.

DigiLocker Sign Up and Consent Screen

Get Access Tokens

Upon successfully signing in with Aadhaar, you will receive an access token to carry out the remaining transactions. You have the flexibility to refresh the token at any time using the refresh token endpoint. If you are unfamiliar with the concepts of refresh and access tokens, we recommend reading this article for a better understanding. The access token is subsequently employed to obtain the list of documents from DigiLocker, primarily to verify that the user possesses the required document you are seeking, such as Aadhaar, PAN or Passport.

Refresh and Access Tokens

Fetch User Details

This is the API responsible for retrieving the user’s details from the DigiLocker wallet. Note that getting user details is optional and typically not necessary when integrating the APIs. This API obtains user information, including their name, ID, and Aadhaar availability status. It’s important to note that this step is entirely optional and should be invoked only if you require verification of the user details in correlation with your applicant details before proceeding with document retrieval.

User Details

List Documents in DigiLocker

This API retrieves the list of government-issued documents from the user’s DigiLocker wallet. It includes all pertinent details for each document in the list, such as the unique document URI, document type, and the issuing authority. It’s important to be aware that this list can sometimes be extensive, depending on the number of documents stored in the user’s wallet. Therefore, we strongly recommend employing appropriate strategies, such as pagination or limiting the number of documents, to retrieve the necessary document list efficiently.

List documents available in DigiLocker

Fetch Documents from DigiLocker

This API retrieves an issued document from the user’s DigiLocker account, provided with the document’s URI. Furthermore, this API is capable of parsing the XML document sent by DigiLocker into a user-friendly JSON format, which can be stored in your databases or displayed in your application. For instance, when you need to fetch the Aadhaar document, you simply need to provide the Aadhaar URI.

Fetch a document from DigiLocker

Fetch Aadhaar from DigiLocker

This is undeniably one of the most essential KYC documents, particularly when you are utilizing Digital KYC or Video KYC processes within your application for customer onboarding. This API retrieves the user’s Aadhaar XML data from the User’s DigiLocker account. The Aadhaar XML is then processed, and the results are presented, furnishing comprehensive Aadhaar KYC details of the customer, encompassing their name, gender, date of birth, address, and photograph.

Aadhaar Offline KYC Document

Too much to handle? help is here

If you find the entire process overwhelming and would prefer a single API that can fetch a user’s Aadhaar or PAN from DigiLocker (ultimately that’s really why as an organisation you would want to use DigiLocker), consider using our no-code Dashboard. It streamlines all the aforementioned steps into a simple flow within your own web or mobile application.

You can read the full API documentation here and please get in touch with us if you would like to get a trial API key to test the integration.

For a live demonstration, please get in touch with us.

You Might Also Like
Battle tested technology.
Use it just the way you want it.

Whether you are just starting out or you are miles ahead and want to optimise your customer experience, you can use our technology just the way you imagine it. In multiple ways for multiple use cases.

Native Mobile SDKs

Offline Android and iOS components for identity capture. Works without internet connection. Quick integration into your native Apps. Tested in over 1000+ mobile devices.

View SDK Documentation video kyc
Cloud APIs

Restful APIs that can be integrated instantly without worrying about infrastructure or auto scaling. Our battle tested AWS environment is ISO 27001:2013 certified and monitored 24x7.

View API Documentation video kyc

Use our technology deployed as Docker containers in your own servers. In this set up there are no external calls outside your servers giving you total control over your data.

Contact Sales video kyc
Cloud Dashboard (no-code)

Get started instantly and begin your identity verification projects. The dashboard provides you with everything you need to onboard your customers as per prevailing regulations.

Book a demo video kyc

Trusted technology platform.

Trust is hard to earn. We certainly do not earn them through paid advertising. Instead, we earn your trust by providing a high-quality product and reliable service that you can count on. Every single day.

Award winning technology
Patent pending technologies matured over ten years with proven accuracy, quality and scale.
Support that truly supports
Whatever it takes, we are here to help you succeed with our tools and services.
Secure enterprise platform
Use our cloud platform to get started now. Or deploy this within your own premises.
Pricing that makes sense
Pay per transaction with discounts as you scale. Or annual subscription with unlimited usage.

Trusted by 150+ customers worldwide

Book a free demo

Built for flexibility, compliance and reliability to serve multiple industry segments.

Gig Economy