Current Session
Get the session the request is authenticated with.
GET /api/auth/sessions/currentResponse
Success Response (200 OK):
{
"code": 200,
"data": [
{
"sid": "4c0f7a1e-2f6b-4d5e-9a63-7f1f0b0e9c2d",
"sub": "user-id",
"iat": { "$date": 1794045600000 },
"exp": { "$date": 1796637600000 },
"status": "Active",
"metadata": {
"label": "Chrome 131 on macOS",
"browser": "Chrome",
"browserVersion": "131",
"os": "macOS",
"device": "Desktop",
"client": "My App"
},
"current": true
}
]
}See Session object for the fields.
Error Responses
404 Not Found - The request has no session:
{
"code": 404,
"error": "No active session for the current request",
"meta": {
"type": "Session Not Found"
}
}401 Unauthorized - The request is authenticated with an API key:
{
"code": 401,
"error": "Only user authentication can manage sessions"
}Last updated on