Digilocker
Identity & KYCStep 1 of DigiLocker KYC - generates a consent link for the customer to sign in to DigiLocker and share documents. Use the returned transaction_id with the Digilocker Fetch Details API.
Endpoint
Request parameters
| Field | Type | Description |
|---|---|---|
digilocker_mobile
required
|
string | Mobile Number Customer mobile number (10 digits) |
digilocker_first_name
optional
|
string | First Name |
digilocker_last_name
optional
|
string | Last Name |
digilocker_email
optional
|
string | |
digilocker_redirect_url
optional
|
string | Redirect URL Where the customer returns after consent |
Example request
curl -X POST https://app.emver.io/api/sandbox/v1/digilocker-kyc \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"digilocker_mobile": "9999999999",
"digilocker_first_name": "string",
"digilocker_last_name": "string",
"digilocker_email": "[email protected]",
"digilocker_redirect_url": "string"
}'
import requests
response = requests.post(
"https://app.emver.io/api/sandbox/v1/digilocker-kyc",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
},
json={
"digilocker_mobile": "9999999999",
"digilocker_first_name": "string",
"digilocker_last_name": "string",
"digilocker_email": "[email protected]",
"digilocker_redirect_url": "string"
},
timeout=60,
)
response.raise_for_status()
data = response.json()
const response = await fetch("https://app.emver.io/api/sandbox/v1/digilocker-kyc", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
"Accept": "application/json",
},
body: JSON.stringify({
"digilocker_mobile": "9999999999",
"digilocker_first_name": "string",
"digilocker_last_name": "string",
"digilocker_email": "[email protected]",
"digilocker_redirect_url": "string"
}),
});
const data = await response.json();
$response = Http::withToken('YOUR_API_KEY')
->acceptJson()
->post('https://app.emver.io/api/sandbox/v1/digilocker-kyc', {
"digilocker_mobile": "9999999999",
"digilocker_first_name": "string",
"digilocker_last_name": "string",
"digilocker_email": "[email protected]",
"digilocker_redirect_url": "string"
});
$data = $response->json();
Replace YOUR_API_KEY and the placeholder values. Use the switch above to see production URLs.
Response
Structure · 200
{
"status": INTEGER,
"message": STRING
}
Example · 200
{
"status": 200,
"message": "string"
}
Error · 4xx / 5xx
{
"status": INTEGER,
"message": STRING
}
See Errors & status codes for what each status means and which calls are billed.
About this API
Digilocker
Step 1 of DigiLocker KYC - generates a consent link for the customer to sign in to DigiLocker and share documents. Use the returned transaction_id with the Digilocker Fetch Details API.
Note: Share consent_url with the customer. After they complete DigiLocker consent, call Digilocker Fetch Details with transaction_id.
Endpoint
POST /api/v1/digilocker-kyc
Content-Type: application/jsonRequest parameters
| Field | Required | Description |
|---|---|---|
digilocker_mobile | Yes | Mobile Number - Customer mobile number (10 digits). Example: 9876543210 |
digilocker_first_name | No | First Name. Example: Rahul |
digilocker_last_name | No | Last Name. Example: Sharma |
digilocker_email | No | Email. Example: [email protected] |
digilocker_redirect_url | No | Redirect URL - Where the customer returns after consent. Example: https://yourapp.com/done |
Sample request
{
"digilocker_mobile": "9876543210",
"digilocker_first_name": "Rahul",
"digilocker_last_name": "Sharma",
"digilocker_email": "[email protected]",
"digilocker_redirect_url": "https://yourapp.com/done"
}Sample success response
{
"status": 200,
"message": "Consent link generated",
"data": {
"consent_url": "...",
"transaction_id": "...",
"link_validity": "..."
}
}Sample error response
{
"status": 404,
"message": "No record found for the given input"
}Response status codes
The status field in the response body indicates the verification outcome.
| status | Meaning |
|---|---|
200 | Verification successful |
422 | Invalid or missing input parameters |
500 | Source unavailable - retry later |