DigiLocker Redirect Request URL

KYC Verification API

This API initiates the DigiLocker Aadhaar verification process and returns a DigiLocker consent redirect URL.

Request URL
POST
https://ekyc.nerotix.in/api/v1/service/digilocker/verify
Authentication Required REQUIRED

Pass a valid Bearer Token in the Authorization header with every request.

Authorization: Bearer YOUR_BEARER_TOKEN
Parameters
Name Type Description
document_requested required array List of documents to be fetched via DigiLocker. Example: AADHAAR
user_flow required string Describes the use case flow (e.g., signup, signin)
redirect_url required string It is the URL you need to provide to redirect the user after completing the DigiLocker journey. It will contain the verification_id, which can be used to check the status of the verification.
Request Body
application/json
{
    "document_requested": [
        "AADHAAR"
    ],
    "user_flow": "signup",
    "redirect_url": "https://app.nerotix.in"
}
Response Examples

API Response

Sample responses returned by the DigiLocker Redirect Request URL API.

Successful Response

Success
DigiLocker consent redirect URL generated
HTTP 200 OK
application/json
{
    "success": true,
    "statusCode": 1,
    "message": "Opening DigiLocker for verification",
    "data": {
        "txn_id": "T20251205112109VELL",
        "reference_id": 2197992,
        "url": "https://verification.cashfree.com/dgl?shortCode=c3ot5bq4uk4g",
        "status": "PENDING",
        "document_requested": [
            "AADHAAR"
        ],
        "user_flow": "signup"
    }
}

Invalid Response

Invalid
Unable to generate DigiLocker consent redirect URL
HTTP 200 OK
application/json
{
    "success": false,
    "statusCode": 0,
    "message": "Unable to generate DigiLocker consent redirect URL",
    "data": null
}
Note Please keep the following points in mind while integrating this API.
  • The API endpoint should be accessed via a POST request.
  • Ensure that the request is properly validated and sanitized to prevent security vulnerabilities.
  • Implement proper error handling on the client side to display user-friendly error messages based on the 'statusCode' and 'message' fields in the response.
  • Always include a valid Bearer Token in the Authorization header when making API requests.