Get current session information
GET /auth/session
GET
/auth/session
Returns information about the current authenticated session. This is a query that returns 200 OK synchronously.
Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”Session information
object
session_id
required
Session identifier
string format: uuid
Example
123e4567-e89b-12d3-a456-426614174000 user_id
required
User identifier
string format: uuid
Example
223e4567-e89b-12d3-a456-426614174001 expires_at
required
Access token expiration time
string format: date-time
Example
2024-12-19T15:30:00Z created_at
required
Session creation time
string format: date-time
Example
2024-12-19T14:30:00Z last_activity_at
required
Last activity time
string format: date-time
Example
2024-12-19T15:00:00Z state
required
Session state
string
Example
activeExamples
{ "session_id": "123e4567-e89b-12d3-a456-426614174000", "user_id": "223e4567-e89b-12d3-a456-426614174001", "expires_at": "2024-12-19T15:30:00Z", "created_at": "2024-12-19T14:30:00Z", "last_activity_at": "2024-12-19T15:00:00Z", "state": "active"}Unauthorized (authentication required or invalid token)
object
error
required
Error code
string
Example
unauthorized message
required
Human-readable error message
string
Example
Invalid username or password details
Additional error details (field-level validation errors, etc.)
object
key
additional properties
any
Examples
{ "error": "unauthorized", "message": "Authentication required"}{ "error": "unauthorized", "message": "Invalid or expired token"}Session not found
object
error
required
Error code
string
Example
unauthorized message
required
Human-readable error message
string
Example
Invalid username or password details
Additional error details (field-level validation errors, etc.)
object
key
additional properties
any
Examples
{ "error": "not_found", "message": "Session not found"}Internal server error
object
error
required
Error code
string
Example
unauthorized message
required
Human-readable error message
string
Example
Invalid username or password details
Additional error details (field-level validation errors, etc.)
object
key
additional properties
any
Examples
{ "error": "internal_error", "message": "An internal error occurred"}