Get Session Information

Prev Next
Get
/api/v1/sessions/info.admin
Premium tag

Retrieve session information for any session on the workspace, regardless of the session owner. This endpoint allows authorized users to access session details across the workspace and requires 2FA. Permission required: view-device-management

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
x-2fa-code
string

The 2FA code. This parameter is required if 2FA is enabled in your workspace. See the Introduction to Two-Factor Authentication document for details.

x-2fa-method
string

Enter the method with which you get the 2FA code. It can be email, totp, or password. This parameter is required if 2FA is enabled in your workspace.

Query parameters
sessionId
stringRequired

The session ID.

Examplewindows
Responses
200

OK

Success Example
{
  "sessionId": "uBNL9dTjJ4s6Pjp4K",
  "userId": "rYhzFRd2QZjNwAAXX",
  "device": {
    "type": "browser",
    "name": "Chrome",
    "longVersion": "113.0.0.0",
    "os": {
      "name": "Windows",
      "version": "10"
    },
    "version": "113.0.0"
  },
  "host": "localhost:3000",
  "ip": "172.20.0.2",
  "loginAt": "2023-05-24T05:08:42.806Z",
  "_user": {
    "name": "Rod",
    "username": "Rod"
  },
  "_id": "uBNL9dTjJ4s6Pjp4K",
  "success": true
}
Expand All
object
sessionId
string
userId
string
device
object
type
string
name
string
longVersion
string
os
object
name
string
version
string
version
string
host
string
ip
string
loginAt
string
_user
object
name
string
username
string
_id
string
success
boolean
400

Bad Request

Session not found
{
  "success": false,
  "error": "Session not found"
}
TOTP Error
{
  "success": false,
  "error": "TOTP Required [totp-required]",
  "errorType": "totp-required",
  "details": {
    "method": "password",
    "codeGenerated": false,
    "availableMethods": []
  }
}
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
403

Forbidden

Permission Error
{
  "success": false,
  "error": "User does not have the permissions required for this action [error-unauthorized]"
}
object
success
boolean
error
string
Tags