Get Current User Session Information

Get
/api/v1/sessions/info
Premium tag

Retrieve session information for sessions owned by the authenticated user. This endpoint provides detailed information about the user's sessions on the workspace. It does not grant access to the session information of other users on the workspace.

Changelog

Version Description
5.0.0 Added
Header parameters
X-User-Id
stringRequired

The user ID.

ExampleCkCPNctrgCDfmWLqC
X-Auth-Token
stringRequired

The authentication token.

Example1Dd4iN_ClKn5jl-xPC36snQ4s9Zd5GZnXCQuCNSKcVE
Query parameters
sessionId
stringRequired

The session ID.

Examplewindows
Responses
200

OK

Success Example
{
  "_id": "646ceae9a8c3a3ba32d0e897",
  "type": "session",
  "sessionId": "QoYYFw2t9oKks2niG",
  "instanceId": "f0313fa9-ebe6-4a84-8580-3104f6a09988",
  "loginToken": "orklPYtfnjnG6mG7OMuLbOBDzs8I9myfcLl2yzv7WoU=",
  "ip": "172.20.0.2",
  "host": "localhost:3000",
  "device": {
    "type": "browser",
    "name": "Chrome",
    "longVersion": "113.0.0.0",
    "os": {
      "name": "Windows",
      "version": "10"
    },
    "version": "113.0.0"
  },
  "userId": "rbAXPnMktTFbNpwtJ",
  "roles": [
    "user",
    "admin",
    "livechat-agent",
    "livechat-manager"
  ],
  "mostImportantRole": "admin",
  "loginAt": "2023-05-23T16:33:45.202Z",
  "day": 23,
  "month": 5,
  "year": 2023,
  "searchTerm": "ChromebrowserWindowsQoYYFw2t9oKks2niGrbAXPnMktTFbNpwtJ",
  "createdAt": "2023-05-23T16:33:45.203Z",
  "_updatedAt": "2023-05-23T17:56:31.599Z",
  "closedAt": "2023-05-23T17:56:31.599Z",
  "lastActivityAt": "2023-05-23T17:56:31.599Z",
  "success": true
}
Expand All
object
_id
string
type
string
sessionId
string
instanceId
string
loginToken
string
ip
string
host
string
device
object
type
string
name
string
longVersion
string
os
object
name
string
version
string
version
string
userId
string
roles
Array of string
string
mostImportantRole
string
loginAt
string
day
integer
month
integer
year
integer
searchTerm
string
createdAt
string
_updatedAt
string
closedAt
string
lastActivityAt
string
success
boolean
400

Bad Request

Session not found
{
  "success": false,
  "error": "Session not found"
}
object
success
boolean
error
string
401

Unauthorized

Authorization Error
{
  "status": "error",
  "message": "You must be logged in to do this."
}
object
status
string
message
string
Tags