Access Token
curl --request POST \
--url https://production.deepvue.tech/v1/kyc/digilocker/access-token \
--header 'Content-Type: application/json' \
--header 'client-id: <api-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"consent": "<string>",
"purpose": "<string>",
"initial_deepvue_transaction_id": "<string>",
"digilocker_code": "<string>"
}
'import requests
url = "https://production.deepvue.tech/v1/kyc/digilocker/access-token"
payload = {
"consent": "<string>",
"purpose": "<string>",
"initial_deepvue_transaction_id": "<string>",
"digilocker_code": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"client-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<api-key>',
'client-id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
consent: '<string>',
purpose: '<string>',
initial_deepvue_transaction_id: '<string>',
digilocker_code: '<string>'
})
};
fetch('https://production.deepvue.tech/v1/kyc/digilocker/access-token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://production.deepvue.tech/v1/kyc/digilocker/access-token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'consent' => '<string>',
'purpose' => '<string>',
'initial_deepvue_transaction_id' => '<string>',
'digilocker_code' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"client-id: <api-key>",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://production.deepvue.tech/v1/kyc/digilocker/access-token"
payload := strings.NewReader("{\n \"consent\": \"<string>\",\n \"purpose\": \"<string>\",\n \"initial_deepvue_transaction_id\": \"<string>\",\n \"digilocker_code\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("client-id", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://production.deepvue.tech/v1/kyc/digilocker/access-token")
.header("x-api-key", "<api-key>")
.header("client-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"consent\": \"<string>\",\n \"purpose\": \"<string>\",\n \"initial_deepvue_transaction_id\": \"<string>\",\n \"digilocker_code\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://production.deepvue.tech/v1/kyc/digilocker/access-token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["client-id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"consent\": \"<string>\",\n \"purpose\": \"<string>\",\n \"initial_deepvue_transaction_id\": \"<string>\",\n \"digilocker_code\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"timestamp": 1766069383550,
"transaction_id": "b07f6adc78b2467d9813980ce7baafea",
"sub_code": "SUCCESS",
"message": "Access Token generated successfully from Digilocker.",
"data": {
"expires_in": 3600,
"consent_valid_till": "1768674599",
"digilockerid": "2d6275fa-3b64",
"name": "John Doe",
"dob": "19011994",
"gender": "M",
"eaadhaar": "Y",
"mobile": "9191993245"
}
}Digilocker
Access Token
The Access Token API allows you to obtain the necessary access token required for authenticating requests to the DigiLocker API.
POST
/
v1
/
kyc
/
digilocker
/
access-token
Access Token
curl --request POST \
--url https://production.deepvue.tech/v1/kyc/digilocker/access-token \
--header 'Content-Type: application/json' \
--header 'client-id: <api-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"consent": "<string>",
"purpose": "<string>",
"initial_deepvue_transaction_id": "<string>",
"digilocker_code": "<string>"
}
'import requests
url = "https://production.deepvue.tech/v1/kyc/digilocker/access-token"
payload = {
"consent": "<string>",
"purpose": "<string>",
"initial_deepvue_transaction_id": "<string>",
"digilocker_code": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"client-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<api-key>',
'client-id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
consent: '<string>',
purpose: '<string>',
initial_deepvue_transaction_id: '<string>',
digilocker_code: '<string>'
})
};
fetch('https://production.deepvue.tech/v1/kyc/digilocker/access-token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://production.deepvue.tech/v1/kyc/digilocker/access-token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'consent' => '<string>',
'purpose' => '<string>',
'initial_deepvue_transaction_id' => '<string>',
'digilocker_code' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"client-id: <api-key>",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://production.deepvue.tech/v1/kyc/digilocker/access-token"
payload := strings.NewReader("{\n \"consent\": \"<string>\",\n \"purpose\": \"<string>\",\n \"initial_deepvue_transaction_id\": \"<string>\",\n \"digilocker_code\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("client-id", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://production.deepvue.tech/v1/kyc/digilocker/access-token")
.header("x-api-key", "<api-key>")
.header("client-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"consent\": \"<string>\",\n \"purpose\": \"<string>\",\n \"initial_deepvue_transaction_id\": \"<string>\",\n \"digilocker_code\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://production.deepvue.tech/v1/kyc/digilocker/access-token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["client-id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"consent\": \"<string>\",\n \"purpose\": \"<string>\",\n \"initial_deepvue_transaction_id\": \"<string>\",\n \"digilocker_code\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"timestamp": 1766069383550,
"transaction_id": "b07f6adc78b2467d9813980ce7baafea",
"sub_code": "SUCCESS",
"message": "Access Token generated successfully from Digilocker.",
"data": {
"expires_in": 3600,
"consent_valid_till": "1768674599",
"digilockerid": "2d6275fa-3b64",
"name": "John Doe",
"dob": "19011994",
"gender": "M",
"eaadhaar": "Y",
"mobile": "9191993245"
}
}Authorizations
The CLIENT_SECRET provided to you. This header parameter is required for authentication purposes.
The CLIENT_ID provided to you. This header parameter is required for authentication purposes.
Body
application/json
Confirms the user's consent for accessing Digilocker services.
Indicates the purpose of the request for accessing the Digilocker API.
Represents the unique identifier associated with the initial DeepVue transaction.
Specifies the code required for accessing Digilocker services.