POST
/
v1
/
sessions
/
get-new-session-token
curl --location 'https://user-auth.otpless.app/v1/sessions/get-new-session-token' \
--header 'clientId: YOUR_CLIENT_ID' \
--header 'clientSecret: YOUR_CLIENT_SECRET' \
--header 'Content-Type: application/json' \
--data '{
    "refreshToken": "REFRESH_TOKEN_FROM_OTPLESS"
}'
{
  "success": true,
  "data": {
    "sessionId": "SESSION_ID_FROM_OTPLESS",
    "refreshToken": "REFRESH_TOKEN_FROM_OTPLESS",
    "sessionToken": "SESSION_TOKEN_FROM_OTPLESS"
  }
}

Authorizations

clientId
string
header
required

The clientId used for API authentication.

clientSecret
string
header
required

The clientSecret used for API authentication.

Body

application/json
Payload containing the `refreshToken` received from OTPLESS authentication.
refreshToken
string
required

The token used to refresh the session.

Example:

"REFRESH_TOKEN_FROM_OTPLESS"

Response

200
application/json
The user's information was successfully retrieved.
success
boolean

Indicates whether the operation was successful.

Example:

true

data
object