Get a user session
GET
/api/users/[user_id]/sessions/[session_id]
Retrieves a specific user session.
Path Parameters
user_id
string
Required
The ID of the user whose session should be retrieved.
session_id
string
Required
The ID of the user session to be retrieved
Authentication
API-Key
header
Required
The API key is essential for accessing MonoCloud's APIs. You can find it in the Tenant Settings section of your MonoCloud dashboard. To authenticate your requests, include this key in the request header using the following format: X-API-Key: <Your_API_Key>.
Headers
accept
string
- application/json
- application/problem+json
Responses
200
Successfully retrieved the user session
422
Client Error
404
Not Found
401
Unauthorized
403
Forbidden
Request Example
Request
curl -X GET "https://<your-domain>/api/users/{user_id}/sessions/{session_id}" \
-H "X-API-KEY: <your-api-key>" \
-H "Accept: application/json"
Response Example
Response
200 OK
{
"last_updated": 1640975400,
"expires_at": 1640983490,
"last_metadata": {
"country": "United States of America",
"city": "Los Angeles",
"latitude": "34.043238",
"ip_address": "1.1.1.1",
"region": "North America",
"user_agent": "The User Agent",
"longitude": "-118.250918"
},
"session_id": "96484D319ACC21380CCE026E54807B4D",
"initiated_at": 1640975400,
"client_ids": [
"eCOGRJYpnNwwAAuCeReEW"
]
}