Skip to main content

Session and tokens

Create a session and get an access token

Send the client id and client secret from your ABDM sandbox registration. The response carries a bearer token that every module API accepts in the Authorization header.

POST/api/hiecm/gateway/v3/sessions

This is the one call that does not itself need a bearer token, which is why security is empty here.

The token is short lived. Read expiresIn from the response rather than assuming a duration, and refresh before it runs out instead of waiting for a 401.

Headers

REQUEST-IDstringRequired

A fresh UUID that you generate for this request. It is how you and the gateway correlate a call with its callback and with a support ticket, so log it. Reusing one across requests makes both impossible.

TIMESTAMPstringRequired

The current time in ISO 8601 UTC, with milliseconds and the Z suffix. The gateway rejects a request whose timestamp has drifted too far from its own clock, so take this from a synchronised clock rather than from a local one.

X-CM-IDstringRequired

Which consent manager you are talking to. sbx on the sandbox and abdm in production. Sending the wrong one against the right host is a common first-day failure and reads as an authorisation error.

Body

clientIdstringRequired

The client id issued when you registered on the ABDM sandbox.

clientSecretstringRequired

The client secret issued alongside the client id. It is a credential. Keep it server side, never in a mobile or browser build.

grantTypestringRequired

The only accepted value is client_credentials.

Responses

200

A session was created and a bearer token was issued.