POST
/
v1
/
sessions
/
get-session-details
curl --location 'https://user-auth.otpless.app/v1/sessions/get-session-details' \
  --header 'Content-Type: application/json' \
  --header 'clientId: YOUR_CLIENT_ID' \
  --header 'clientSecret: YOUR_CLIENT_SECRET' \
  --data '{
      "sessionToken": "RECEIVED_SESSION_TOKEN_FROM_OTPLESS"
  }'
  
{
  "sessionToken": "SESSION_ID",
  "userId": "USER_ID",
  "startedAt": 1725879411000,
  "lastActiveAt": 1725879411000,
  "identities": [
    {
      "identityType": "EMAIL",
      "identityValue": "user@example.com",
      "channel": "EMAIL_LOGIN",
      "methods": [
        "EMAIL"
      ],
      "name": "Lorem Ipsum",
      "verifiedAt": 1725879354000
    }
  ],
  "deviceInfo": {
    "userAgent": "Mozilla/5.0 (Linux; Android 11; SM-M022G Build/RP1A.200720.012; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/127.0.6533.103 Mobile Safari/537.36",
    "platform": "Linux armv7l",
    "vendor": "Google Inc.",
    "browser": "Chrome",
    "connection": "4g",
    "language": "en",
    "cookieEnabled": true,
    "screenWidth": 385,
    "screenHeight": 854,
    "screenColorDepth": 24,
    "devicePixelRatio": 1.875,
    "timezoneOffset": -330,
    "cpuArchitecture": "4-core",
    "fontFamily": "sans-serif"
  },
  "network": {
    "ip": "157.35.40.203",
    "timezone": "Asia/Kolkata",
    "ipLocation": {
      "city": {
        "name": "Patna"
      },
      "subdivisions": {
        "code": "BR",
        "name": "Bihar"
      },
      "country": {
        "code": "IN",
        "name": "India"
      },
      "continent": {
        "code": "AS"
      },
      "latitude": 25.5908,
      "longitude": 85.1348,
      "postalCode": "800001"
    }
  }
}

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.

The body is of type object.

Response

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

The response is of type object.