Authorized Partner API Specification
digitallocker · Data
To access files in user’s DigiLocker account from your application, you must first obtain user’s authorization.
Authentication
Sample Requests
Call 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 DigiLocker and authorize your application to access user’s data. After the user decides whether or not to authorize your app, they will be redirected t
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/digitallocker.gov.in/authpartner/1.0.0/oauth2/1/authorize?state=example&dl_flow=example&client_id=example&redirect_uri=example&response_type=example&Code_challenge=base64_url_encode_without_padding(sha256(code_verifier))&Verified_mobile=1&Code_challenge_method=example"
import requests
params = {
"state": "example",
"dl_flow": "example",
"client_id": "example",
"redirect_uri": "example",
"response_type": "example",
"Code_challenge": "base64_url_encode_without_padding(sha256(code_verifier))",
"Verified_mobile": "1",
"Code_challenge_method": "example"
}
response = requests.get(
"https://api.apis.guru/v2/specs/digitallocker.gov.in/authpartner/1.0.0/oauth2/1/authorize",
params=params,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/digitallocker.gov.in/authpartner/1.0.0/oauth2/1/authorize');
url.searchParams.set('state', 'example');
url.searchParams.set('dl_flow', 'example');
url.searchParams.set('client_id', 'example');
url.searchParams.set('redirect_uri', 'example');
url.searchParams.set('response_type', 'example');
url.searchParams.set('Code_challenge', 'base64_url_encode_without_padding(sha256(code_verifier))');
url.searchParams.set('Verified_mobile', '1');
url.searchParams.set('Code_challenge_method', 'example');
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/digitallocker.gov.in/authpartner/1.0.0/oauth2/1/authorize")
q := baseURL.Query()
q.Set("state", "example")
q.Set("dl_flow", "example")
q.Set("client_id", "example")
q.Set("redirect_uri", "example")
q.Set("response_type", "example")
q.Set("Code_challenge", "base64_url_encode_without_padding(sha256(code_verifier))")
q.Set("Verified_mobile", "1")
q.Set("Code_challenge_method", "example")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/digitallocker.gov.in/authpartner/1.0.0/oauth2/1/authorize")
uri.query = URI.encode_www_form({
"state" => "example",
"dl_flow" => "example",
"client_id" => "example",
"redirect_uri" => "example",
"response_type" => "example",
"Code_challenge" => "base64_url_encode_without_padding(sha256(code_verifier))",
"Verified_mobile" => "1",
"Code_challenge_method" => "example"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/digitallocker.gov.in/authpartner/1.0.0/oauth2/1/authorize?" . http_build_query([
"state" => "example",
"dl_flow" => "example",
"client_id" => "example",
"redirect_uri" => "example",
"response_type" => "example",
"Code_challenge" => "base64_url_encode_without_padding(sha256(code_verifier))",
"Verified_mobile" => "1",
"Code_challenge_method" => "example"
]);
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Returns the list of meta-data about documents or folders in user’s DigiLocker in a specific location.
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/digitallocker.gov.in/authpartner/1.0.0/oauth2/1/files/"
import requests
response = requests.get(
"https://api.apis.guru/v2/specs/digitallocker.gov.in/authpartner/1.0.0/oauth2/1/files/",
)
print(response.json())const url = 'https://api.apis.guru/v2/specs/digitallocker.gov.in/authpartner/1.0.0/oauth2/1/files/'; const response = await fetch(url); const data = await response.json(); console.log(data);
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
targetURL := "https://api.apis.guru/v2/specs/digitallocker.gov.in/authpartner/1.0.0/oauth2/1/files/"
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/digitallocker.gov.in/authpartner/1.0.0/oauth2/1/files/")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/digitallocker.gov.in/authpartner/1.0.0/oauth2/1/files/";
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Client 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 API. The API will return the user details of the account with which the access token is linked. It is strongly recommended that the API can b
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/digitallocker.gov.in/authpartner/1.0.0/oauth2/1/user"
import requests
response = requests.get(
"https://api.apis.guru/v2/specs/digitallocker.gov.in/authpartner/1.0.0/oauth2/1/user",
)
print(response.json())const url = 'https://api.apis.guru/v2/specs/digitallocker.gov.in/authpartner/1.0.0/oauth2/1/user'; const response = await fetch(url); const data = await response.json(); console.log(data);
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
targetURL := "https://api.apis.guru/v2/specs/digitallocker.gov.in/authpartner/1.0.0/oauth2/1/user"
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/digitallocker.gov.in/authpartner/1.0.0/oauth2/1/user")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/digitallocker.gov.in/authpartner/1.0.0/oauth2/1/user";
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Postman Setup Guide
- See official documentation for authentication and setup.
What can you build with Authorized Partner API Specification?
Authorized Partner API Specification is a Data API. Developers commonly use data APIs for:
- enriching your app with third-party datasets
- building data pipelines and ETL workflows
- querying and searching large datasets
- powering research, analysis, and reporting tools
- syncing reference data into your own systems
No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. Authorized Partner API Specification is free to use, making it a low-risk choice to experiment with.
New to APIs? Read our beginner's guide