DigiLocker Document Download
Download a specific verified document from a user's DigiLocker account using its URI. Supports all government-issued documents.
curl -X POST "https://production.deepvue.tech/v1/kyc/digilocker/file" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-H "client-id: YOUR_API_KEY" \
-d '{
"consent": "example_string",
"purpose": "example_string",
"initial_deepvue_transaction_id": "example_string",
"uri": "example_string"
}'
import requests
import json
url = "https://production.deepvue.tech/v1/kyc/digilocker/file"
headers = {
"Content-Type": "application/json",
"x-api-key": "YOUR_API_KEY",
"client-id": "YOUR_API_KEY"
}
data = {
"consent": "example_string",
"purpose": "example_string",
"initial_deepvue_transaction_id": "example_string",
"uri": "example_string"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://production.deepvue.tech/v1/kyc/digilocker/file", {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-api-key": "YOUR_API_KEY",
"client-id": "YOUR_API_KEY"
},
body: JSON.stringify({
"consent": "example_string",
"purpose": "example_string",
"initial_deepvue_transaction_id": "example_string",
"uri": "example_string"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"consent": "example_string",
"purpose": "example_string",
"initial_deepvue_transaction_id": "example_string",
"uri": "example_string"
}`)
req, err := http.NewRequest("POST", "https://production.deepvue.tech/v1/kyc/digilocker/file", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("x-api-key", "YOUR_API_KEY")
req.Header.Set("client-id", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://production.deepvue.tech/v1/kyc/digilocker/file')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['x-api-key'] = 'YOUR_API_KEY'
request['client-id'] = 'YOUR_API_KEY'
request.body = '{
"consent": "example_string",
"purpose": "example_string",
"initial_deepvue_transaction_id": "example_string",
"uri": "example_string"
}'
response = http.request(request)
puts response.body
{
"code": 200,
"timestamp": null,
"transaction_id": "string",
"sub_code": "SUCCESS",
"message": "Issued files fetched successfully.",
"data": "string"
}
{
"code": 301,
"timestamp": null,
"transaction_id": "string",
"sub_code": "INVALID_URI",
"message": "unsupported service"
}
{
"code": 400,
"timestamp": null,
"transaction_id": "string",
"sub_code": "DUPLICATE_REQUEST",
"message": "Invalid Initial Deepvue Transaction id."
}
{
"code": 401,
"timestamp": null,
"transaction_id": "string",
"sub_code": "SESSION_EXPIRED",
"message": "Digilocker session expired."
}
{
"detail": "Not a valid token"
}
{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}
{
"code": null,
"timestamp": null,
"transaction_id": "string",
"message": "Failed at bank"
}
/v1/kyc/digilocker/file
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.
The media type of the request body
Indicates whether the user has provided consent for the download.
The purpose of the file download request.
The unique transaction id associated with the request.
Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. The CLIENT_SECRET provided to you. This header parameter is required for authentication purposes.
API Key for authentication. The CLIENT_ID provided to you. This header parameter is required for authentication purposes.
Body
Indicates whether the user has provided consent for the download.
The purpose of the file download request.
The unique transaction id associated with the request.
Responses
This API enables you to download files from DigiLocker based on issued documents, using a URN (Uniform Resource Name) as the identifier. It is part of the broader DigiLocker integration workflow within the Deepvue platform.
Last updated 4 weeks ago
Built with Documentation.AI