Get session details
Retrieves comprehensive details for a specific user session including authentication status, device information, and expiration timelines. Use this endpoint to fetch current session metadata for security audits, session validation, or to display session information in user account management interfaces. Returns all session properties including the user ID, authenticated organizations, device details with browser/OS information, IP address and geolocation, and all relevant timestamps (creation, last activity, idle expiration, absolute expiration, and actual expiration if applicable).
Request
- Base URLhttps://$SCALEKIT_ENVIRONMENT_URL
- AuthOAuth 2Client credentialsToken URLhttps://$SCALEKIT_ENVIRONMENT_URL/oauth/token
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
Unique identifier for the session. Must start with 'ses_' prefix.
Response
Successfully retrieved session details
Example response
{
"absolute_expires_at": "2025-01-22T10:30:00Z",
"authenticated_clients": [
{
"client_id": "skc_1234567890",
"organization_id": "org_1234567890"
}
],
"authenticated_organizations": [
"org_123",
"org_456"
],
"created_at": "2025-01-15T10:30:00Z",
"device": {
"browser": "Chrome",
"browser_version": "120.0.0.0",
"device_type": "desktop",
"ip": "192.0.2.1",
"location": {
"city": "San Francisco",
"latitude": "37.7749",
"longitude": "-122.4194",
"region": "United States",
"region_subdivision": "CA"
},
"os": "macOS",
"os_version": "14.2",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
},
"expired_at": "2025-01-15T12:00:00Z",
"idle_expires_at": "2025-01-15T11:30:00Z",
"last_active_at": "2025-01-15T10:55:30Z",
"logout_at": "2025-01-15T14:00:00Z",
"organization_id": "org_1234567890123456",
"session_id": "ses_1234567890123456",
"status": "active",
"updated_at": "2025-01-15T10:45:00Z",
"user_id": "usr_1234567890123456"
}Changes
No recorded changes to this operation across all 16 revisions of this API.