v1

latestOpenAPI 3.0.32026-07-14108241269.2 KB
DigiLocker

Get DigiLocker reference key

Exchanges an authorization code and code_verifier for a short-lived reference_key used in subsequent DigiLocker operations. Requires X-API-KEY and X-Client-ID headers.

post/verify/digilocker/get_reference

Request body

codestring required

Authorization code received from DigiLocker after user consent.

code_verifierstring required

PKCE code_verifier used during the OAuth flow.

Example request

{
  "code": "e5c55b5e179f4a5fb58eb8682c850077f42e8d4c",
  "code_verifier": "m.QwNXOAMN-Mv5UY_Dou8wCovxnP9CTN6t9izSyMU8mWv7stAiRDM6L7I94AvL"
}

Response

Reference key generated

statusstring required

Overall API response status

reference_keystring required

Short-lived reference key to use with DigiLocker fetch endpoints

expires_atstring date-time required

ISO 8601 expiry timestamp for the reference_key (UTC)

chargeblestring

Indicates if the operation is chargeable ('true'|'false')

user_consentstring

Indicates whether user consent was recorded ('true'|'false')

Example response

{
  "status": "success",
  "reference_key": "1700000000000_abcdef123456",
  "expires_at": "2025-12-10T11:39:58.342571Z",
  "chargeble": "true",
  "user_consent": "true"
}