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
| Header | Type | Description | Example |
|---|---|---|---|
| Authorization | string | Bearer token for user authentication | Bearer access_token |
| x-api-key | string | API key for client authentication | x-api-key |
🟢Success Response - 200 OK
Content-type : application/json
| Field | Type | Description | Example/ENUM |
|---|---|---|---|
| status | string | Status of the API call (always "success") | "success" |
| code | string | Response code indicating outcome of the request | "s-101" |
| message | string | Description of the result | "Session Verified" |
| data | string | JSON-stringified object with session status details | Refer 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);
| Field | Type | Description | Example |
|---|---|---|---|
| status | string | Internal session validation status. Note: field name conflicts with outer status | "false" |
| message | string | Internal validation message "TRUE" means the token is valid | "TRUE" |
| dropped | string | Whether the session was dropped/expired. "true" = session is no longer active | "true" |