DigiLocker Verify Account - Check for an Existing Account
Check whether an Aadhaar or mobile number already has a DigiLocker account, so you can send new users straight to DigiLocker sign-up.
curl -X POST "https://production.deepvue.tech/v1/kyc/digilocker/verify-account" \
-H "Content-Type: application/json" \
-H "X-Deepvue-Origin: acme-web" \
-H "x-api-key: YOUR_API_KEY" \
-H "client-id: YOUR_API_KEY" \
-d '{
"consent": "Y",
"purpose": "Personal loan application",
"mobile_number": "9876543210"
}'
import requests
import json
url = "https://production.deepvue.tech/v1/kyc/digilocker/verify-account"
headers = {
"Content-Type": "application/json",
"X-Deepvue-Origin": "acme-web",
"x-api-key": "YOUR_API_KEY",
"client-id": "YOUR_API_KEY"
}
data = {
"consent": "Y",
"purpose": "Personal loan application",
"mobile_number": "9876543210"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://production.deepvue.tech/v1/kyc/digilocker/verify-account", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Deepvue-Origin": "acme-web",
"x-api-key": "YOUR_API_KEY",
"client-id": "YOUR_API_KEY"
},
body: JSON.stringify({
"consent": "Y",
"purpose": "Personal loan application",
"mobile_number": "9876543210"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"consent": "Y",
"purpose": "Personal loan application",
"mobile_number": "9876543210"
}`)
req, err := http.NewRequest("POST", "https://production.deepvue.tech/v1/kyc/digilocker/verify-account", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-Deepvue-Origin", "acme-web")
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/verify-account')
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-Deepvue-Origin'] = 'acme-web'
request['x-api-key'] = 'YOUR_API_KEY'
request['client-id'] = 'YOUR_API_KEY'
request.body = '{
"consent": "Y",
"purpose": "Personal loan application",
"mobile_number": "9876543210"
}'
response = http.request(request)
puts response.body
{
"code": 200,
"timestamp": 1795412345678,
"transaction_id": "0f8b1c2d3e4f45a6b7c8d9e0f1a2b3c4",
"sub_code": "SUCCESS",
"message": "Digilocker account verified successfully.",
"data": {
"registered": true,
"digilocker_id": "123e4567-e89b-12d3-a456-426655440000"
}
}
{
"code": 200,
"timestamp": 1795412345678,
"transaction_id": "0f8b1c2d3e4f45a6b7c8d9e0f1a2b3c4",
"sub_code": "SUCCESS",
"message": "Digilocker account verified successfully.",
"data": {
"registered": false,
"digilocker_id": null
}
}
{
"code": 400,
"timestamp": 1795412345678,
"transaction_id": "0f8b1c2d3e4f45a6b7c8d9e0f1a2b3c4",
"sub_code": "INVALID_PARAMETER",
"message": "Either one of uid or mobile number is mandatory"
}
{
"detail": "Inactive client_id"
}
{
"detail": "Not authenticated"
}
{
"detail": "Not a valid token"
}
{
"code": 422,
"timestamp": 1795412345678,
"transaction_id": "0f8b1c2d3e4f45a6b7c8d9e0f1a2b3c4",
"sub_code": "INVALID_INPUT",
"message": "Provide exactly one of aadhaar_number or mobile_number."
}
{
"code": 422,
"timestamp": 1795412345678,
"transaction_id": "0f8b1c2d3e4f45a6b7c8d9e0f1a2b3c4",
"sub_code": "INVALID_INPUT",
"message": "Invalid aadhaar_number. It must be 12 digits."
}
{
"code": 422,
"timestamp": 1795412345678,
"transaction_id": "0f8b1c2d3e4f45a6b7c8d9e0f1a2b3c4",
"sub_code": "INVALID_INPUT",
"message": "Invalid mobile_number. It must be 10 digits."
}
{
"detail": "Internal Server Error"
}
{
"code": 503,
"timestamp": 1795412345678,
"transaction_id": "0f8b1c2d3e4f45a6b7c8d9e0f1a2b3c4",
"sub_code": "FAILED",
"message": "Failed to fetch data from Digilocker."
}
/v1/kyc/digilocker/verify-account
Target server for requests. Edit to use your own host.
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
Identifies the product, service, or platform you are calling the API from. The value appears in the Caller column of Transaction logs and in dashboard analytics.
- Use lowercase letters, digits, and hyphens only
- Start with a letter or digit
- Maximum 32 characters
A value that does not match ^[a-z0-9][a-z0-9-]{0,31}$ is rejected with INVALID_ORIGIN_METADATA.
Whether the user has consented to the check, for example Y.
Why you are checking, for example Personal loan application.
The user's 12-digit Aadhaar number. Send either aadhaar_number or mobile_number, not both.
The user's 10-digit mobile number, without +91 or a leading 0. Send either aadhaar_number or mobile_number, not both.
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.
Headers
Identifies the product, service, or platform you are calling the API from. The value appears in the Caller column of Transaction logs and in dashboard analytics.
- Use lowercase letters, digits, and hyphens only
- Start with a letter or digit
- Maximum 32 characters
A value that does not match ^[a-z0-9][a-z0-9-]{0,31}$ is rejected with INVALID_ORIGIN_METADATA.
acme-webBody
Whether the user has consented to the check, for example Y.
Why you are checking, for example Personal loan application.
The user's 12-digit Aadhaar number. Send either aadhaar_number or mobile_number, not both.
The user's 10-digit mobile number, without +91 or a leading 0. Send either aadhaar_number or mobile_number, not both.
Responses
Deepvue sends the Aadhaar or mobile number to DigiLocker to run this check and does not store it. The response only tells you whether a DigiLocker account exists and, if it does, its DigiLocker ID. It never returns the user's name, documents, or other personal details.
Collect the user's consent before you call this API, and send consent as Y only when you have it.
Mask Aadhaar numbers wherever you store or log them on your side. See Consent & Compliance.