POST
/
v1
/
sessions
/
validate-session
curl --location 'https://user-auth.otpless.app/v1/sessions/validate-session' \
    --header 'clientId: YOUR_CLIENT_ID' \
    --header 'clientSecret: YOUR_CLIENT_SECRET' \
    --header 'Content-Type: application/json' \
    --data '{
        "sessionToken":"RECEIVED_SESSION_TOKEN_FROM_OTPLESS"
    }'
{
  "success": true
}

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 `sessionToken` received from otpless authentication and client credentials for verification.
sessionToken
string
required

The unique identifier of the session.

Response

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

A boolean value indicating whether session is valid. True indicates session is valid and false indicates session is invalid.

Example:

true