Authorized Partner API Specification
To access files in user’s DigiLocker account from your application, you must first obtain user’s authorization.
Government & public#openapi#open-data
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
To access files in user’s DigiLocker account from your application, you must first obtain user’s authorization.
Endpoints 22
Authorization
- GETGet Authorization Code
/oauth2/1/authorize?client_id=string&response_type=string&redirect_uri=string&state=string&Code_challenge=base64_url_encode_without_padding(sha256(code_verifier))&Code_challenge_method=string&dl_flow=string&Verified_mobile=0Call to this API starts authorization flow using OAuth 2.0 protocol. This isn't an API call—it's a DigiLocker web page that lets the user sign in to… - POSTGet Access Token
/oauth2/1/tokenThis endpoint only applies to apps using the authorization code flow. An app calls this endpoint to acquire a bearer token once the user has authorized the…
Authorization API
- POSTGet Device Code
/oauth2/1/codeThe client device calls the DigiLocker API to get the device code by providing the client_id issued to the device OEM and either the username or the mobile…
Token Revocation API
- POSTRevoke Token.
/oauth2/1/revokeClient applications can revoke a previously obtained refresh or access token when it is no longer needed. This is done by making a request to the token…
Account Detail API
- GETGet User Details
/oauth2/1/userClient applications can call this API to get the DigiLocker Id, name, date of birth and gender of the account holder. An access token is required to call this…
File APIs
- POSTUpload file to locker
/oauth2/1/file/uploadThis API can be used to save/upload a file to uploaded documents in DigiLocker. The allowed file types are JPG, JPEG, PNG and PDF. The file size must not… - GETGet File from URI
/oauth2/1/file/:uriReturns a file from URI. This API can be used to fetch both issued document and uploaded document. - GETGet List of Self Uploaded Documents
/oauth2/1/files/Returns the list of meta-data about documents or folders in user’s DigiLocker in a specific location. - GETIssued Documents
/oauth2/1/files/issuedReturns the list of meta-data about issued documents in user’s DigiLocker. - GETGet List of Self Uploaded Documents
/oauth2/1/files/:idReturns the list of meta-data about documents or folders in user’s DigiLocker in a specific location. - POSTPull Document
/oauth2/1/pull/pulldocumentThis API allows a client application to search a document/certificate from issuer’s repository using the parameters provided by a user. The searched document… - GETGet Certificate Data in XML Format from URI
/oauth2/1/xml/:uriReturns the certificate data in machine readable XML format for a URI. This API can be used to only for issued documents. The XML data may not be available… - GETIssued Documents
/oauth2/2/files/issuedReturns the list of meta-data about issued documents in user’s DigiLocker. - GETGet e-Aadhaar Data in XML Format
/oauth2/2/xml/eaadhaarReturns e-Aadhaar data in XML format for the account.
DigiLocker Sign up APIs
- POSTVerify OTP
/signup/1/demoauthverifyThis API is used to verify the OTP sent by DigiLocker during the sign up API call above. - POSTSIGN UP
/signup/2/demoauthThis API is used to validate Aadhaar details and verify the mobile number by generating an OTP. This API call, if successful, will be followed by verify OTP…
DigiLocker Meta APIs
- POSTPush URI to Account
/account/1/pushuriThe API can use to push or delete a single URI into Digital Locker using DigiLocker Id acquired using Get User Details API. This API can be used to push the… - POSTVerify Account
/account/2/verifyThis API can be used to verify whether a mobile number or Aadhaar number is already registered with DigiLocker. - POSTGet List of Documents Provided by an Issuer
/oauth2/1/pull/doctypeReturns a list of documents/certificates issued by an issuer organization registered with DigiLocker. - POSTGet List of Issuers
/oauth2/1/pull/issuersReturns the list of issuers registered with DigiLocker. - POSTGet Search Parameters for a Document
/oauth2/1/pull/parametersReturns a list of parameters required to search a document/certificate of an issuer organization registered with DigiLocker. These parameters are used to pull… - POSTGet Statistics
/statistics/1/countsReturns DigiLocker statistics such as the count of users, authentic documents, issuers and requesters as on a specific date.
API details
- Base URL
https://betaapi.digitallocker.gov.in/public- Authentication
- An API key in the X-2 header
An API key in the X1123 header
A bearer token in the Authorization header
OAuth 2.0 (authorization code flow)
OAuth 2.0 (client credentials flow) with 1 scope - Operations
- 22 operations on 22 pathsPOST 13GET 9
- Main resources
- File APIs 9DigiLocker Meta APIs 6Authorization 2DigiLocker Sign up APIs 2Account Detail API 1Authorization API 1Token Revocation API 1
- Response formats
application/jsonapplication/xmlapplication/pdfimage/jpeg- Description format
- OpenAPI 3.0.2, API version
1.0.0 - Links
- OpenAPI document · Terms of service
- Listed from
- APIs.guru OpenAPI Directory (CC0-1.0)
Source updated
How to test the Authorized Partner API Specification in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the Authorized Partner API Specification collection, without the publisher's secrets.
- Add your credentialsThis API uses an API key in the X-2 header. Add yours in the collection's variables or an environment; the requests already reference it.
- Send a requestPick an endpoint, for example “Get Authorization Code” (GET /oauth2/1/authorize?client_id=string&response_type=string&redirect_uri=string&state=string&Code_challenge=base64_url_encode_without_padding(sha256(code_verifier))&Code_challenge_method=string&dl_flow=string&Verified_mobile=0), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the Authorized Partner API Specification?
To access files in user’s DigiLocker account from your application, you must first obtain user’s authorization. It is listed under Government & public and has 22 endpoints.
Who publishes the Authorized Partner API Specification?
It is listed from Digitallocker's public API description (an OpenAPI document), not published by Digitallocker on Swastik Codes. Anyone who controls digitallocker.gov.in can claim the profile by adding a DNS TXT record.
What is the base URL of the Authorized Partner API Specification?
Requests go to https://betaapi.digitallocker.gov.in/public. Endpoint paths are added to this base URL.
How do I authenticate with the Authorized Partner API Specification?
It accepts 5 methods: an API key in the X-2 header; an API key in the X1123 header; A bearer token in the Authorization header; OAuth 2.0 (authorization code flow); OAuth 2.0 (client credentials flow) with 1 scope.
How many endpoints does the Authorized Partner API Specification have?
22 operations on 22 paths (13 POST, 9 GET). The largest groups are File APIs, DigiLocker Meta APIs, Authorization, DigiLocker Sign up APIs.
Is forking the Authorized Partner API Specification free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.