Get Session
Get a session by its ID.
GET /api/auth/sessions/{sid}Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
sid | string | yes | The session ID |
Response
Success Response (200 OK):
{
"code": 200,
"data": [
{
"sid": "9a1d2c3b-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"sub": "user-id",
"iat": { "$date": 1794045600000 },
"exp": { "$date": 1796637600000 },
"status": "Active",
"metadata": {
"label": "Safari 17 on iOS",
"browser": "Safari",
"browserVersion": "17",
"os": "iOS",
"device": "Mobile",
"client": "My App"
},
"current": false
}
]
}See Session object for the fields.
Error Responses
404 Not Found - The session doesn’t exist:
{
"code": 404,
"error": "Session not found",
"meta": {
"type": "Session Not Found"
}
}Last updated on