API documentation
Sandbox & testing
Test the API end to end with free test keys, sample data and the DigiLocker sandbox.
Use a test key (kk_test_…) to run the full flow for free. The sandbox replaces DigiLocker and behaves the same way as live.
Consent screen
The authorization_url of a test session opens a sandbox screen with Allow and Deny buttons. Allow authorizes the session; Deny fails it with access_denied.
Sample data
- User: Sunil Kumar, DOB 31-12-1970, male, mobile 9876543210, masked Aadhaar
xxxxxxxx1234 - Issued documents:
PANCR(in.gov.pan-PANCR-ABCDE1234F),DRVLC,HSCER - e-Aadhaar with full address and photo
- Uploaded files: one folder (
id=5678) and one PDF
Special values
POST /accounts/verify: numbers ending in0are "not registered"; others are registered.- Unknown folder IDs return
404 invalid_id; URIs without a dash return404 invalid_uri. - Hosted workflows in test mode accept OTP
123456.
Going live
Switch the key prefix to kk_live_, top up your wallet, and make sure your webhook endpoint verifies signatures. No other code changes are needed.