Skip to main content

Validate Session

This API checks whether the access_token passed in the Authorization header is still active in the system. Use this to verify token validity before making sensitive API calls, or to implement session timeout checks in your application.

🔑Header Parameters

HeaderTypeDescriptionExample
AuthorizationstringBearer token for user authenticationBearer access_token
x-api-keystringAPI key for client authenticationx-api-key

🟢Success Response - 200 OK

Content-type : application/json

FieldTypeDescriptionExample/ENUM
statusstringStatus of the API call (always "success")"success"
codestringResponse code indicating outcome of the request"s-101"
messagestringDescription of the result"Session Verified"
datastringJSON-stringified object with session status detailsRefer Below

📦 Data Field (JSON-stringified object)

important

The data field is returned as a JSON string, not a nested object.

Parse it before accessing any properties:

const payload = JSON.parse(response.data);
FieldTypeDescriptionExample
statusstringInternal session validation status. Note: field name conflicts with outer status"false"
messagestringInternal validation message "TRUE" means the token is valid"TRUE"
droppedstringWhether the session was dropped/expired. "true" = session is no longer active"true"