List Active Sessions
Get all active sessions for the authenticated user.Endpoint
Authentication
Requires valid access token (Bearer authentication).Response
Always
true for successful requestsArray of active session objects
Example Request
Example Response
Revoke Specific Session
Revoke a specific session by ID, logging out that device.Endpoint
Authentication
Requires valid access token (Bearer authentication).Path Parameters
Session ID to revoke (MongoDB ObjectId)
Response
Always
true for successful requestsSuccess message
Example Request
Example Response
Error Responses
401 Unauthorized
Invalid or expired access token
403 Forbidden
Attempting to revoke a session that doesn’t belong to you
404 Not Found
Session ID not found
Use Cases
- Security audit: View all devices where you’re logged in
- Logout other devices: Revoke sessions on lost or stolen devices
- Session management: Track when and where you’ve been logged in