Skip to main content

Session and tokens

Encrypt a value with the ABDM public key

Every loginId in M1 is encrypted rather than sent raw, and this is the hosted helper for doing it. It is convenient for trying a flow by hand.

POST/v3/phr/app/enrollment/encrypt

Do not put it in a production path. Sending an Aadhaar or mobile number to a remote endpoint so that it can be encrypted defeats the point of encrypting it. Encrypt locally against NHA's published public key instead.

Authorizations

Authorizationbearer tokenRequired

The accessToken from POST /api/hiecm/gateway/v3/sessions. Send it as Authorization: Bearer <ACCESS_TOKEN>.

Headers

REQUEST-IDstringRequired

Unique UUID v4 per request. Used for idempotency and distributed tracing. Generate a fresh UUID for every call.

TIMESTAMPstringRequired

ISO 8601 UTC timestamp of the request.

KEY_TYPEstring

Which ABDM public key the encryption helper should use.

Body

datastringRequired

Responses

200

The specification does not describe this body. Send the call with Try it to see what comes back.