> ## Documentation Index
> Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Session Information

> <div style="text-align: center; margin: 1rem 0 1rem 0;"><img src="https://raw.githubusercontent.com/RocketChat/Rocket.Chat-Open-API/main/images/premium.svg" alt="Premium tag" style="display: block; margin: auto;"></div>

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       |

## OpenAPI

````json GET /api/v1/sessions/info.admin
{
  "openapi": "3.0.0",
  "info": {
    "version": "1.0.0",
    "title": "Settings"
  },
  "servers": [
    {
      "url": "https://apiexplorer.support.rocket.chat"
    }
  ],
  "paths": {
    "/api/v1/sessions/info.admin": {
      "parameters": [],
      "get": {
        "summary": "Get Session Information",
        "operationId": "get-api-v1-sessions-info.admin",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "sessionId": {
                      "type": "string"
                    },
                    "userId": {
                      "type": "string"
                    },
                    "device": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "longVersion": {
                          "type": "string"
                        },
                        "os": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "version": {
                              "type": "string"
                            }
                          }
                        },
                        "version": {
                          "type": "string"
                        }
                      }
                    },
                    "host": {
                      "type": "string"
                    },
                    "ip": {
                      "type": "string"
                    },
                    "loginAt": {
                      "type": "string"
                    },
                    "_user": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "username": {
                          "type": "string"
                        }
                      }
                    },
                    "_id": {
                      "type": "string"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  }
                },
                "examples": {
                  "Success Example": {
                    "value": {
                      "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"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Session not found": {
                    "value": {
                      "success": "false",
                      "error": "Session not found"
                    }
                  },
                  "TOTP Error": {
                    "value": {
                      "success": "false",
                      "error": "TOTP Required [totp-required]",
                      "errorType": "totp-required",
                      "details": {
                        "method": "password",
                        "codeGenerated": "false",
                        "availableMethods": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/authorizationError"
          },
          "403": {
            "$ref": "#/components/responses/forbiddenError"
          }
        },
        "description": "<div style=\"text-align: center; margin: 1rem 0 1rem 0;\"><img src=\"https://raw.githubusercontent.com/RocketChat/Rocket.Chat-Open-API/main/images/premium.svg\" alt=\"Premium tag\" style=\"display: block; margin: auto;\"></div>\n\nRetrieve 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.\nPermission required: `view-device-management`\n\n### Changelog\n| Version      | Description |\n| ------------ | ------------|\n|5.0.0         | Added       |",
        "tags": [
          "Device Management"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/X-User-Id"
          },
          {
            "$ref": "#/components/parameters/X-Auth-Token"
          },
          {
            "schema": {
              "type": "string"
            },
            "example": "windows",
            "in": "query",
            "name": "sessionId",
            "description": "The session ID.",
            "required": "true"
          },
          {
            "$ref": "#/components/parameters/x-2fa-code"
          },
          {
            "$ref": "#/components/parameters/X-2fa-method"
          }
        ]
      }
    }
  },
  "components": {
    "responses": {
      "authorizationError": {
        "description": "Unauthorized",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            },
            "examples": {
              "Authorization Error": {
                "value": {
                  "status": "error",
                  "message": "You must be logged in to do this."
                }
              }
            }
          }
        }
      },
      "forbiddenError": {
        "description": "Forbidden",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean"
                },
                "error": {
                  "type": "string"
                }
              }
            },
            "examples": {
              "Permission Error": {
                "value": {
                  "success": "false",
                  "error": "User does not have the permissions required for this action [error-unauthorized]"
                }
              }
            }
          }
        }
      }
    },
    "parameters": {
      "X-User-Id": {
        "name": "X-User-Id",
        "in": "header",
        "required": "true",
        "schema": {
          "type": "string"
        },
        "example": "CkCPNctrgCDfmWLqC",
        "description": "The user ID."
      },
      "X-Auth-Token": {
        "name": "X-Auth-Token",
        "in": "header",
        "required": "true",
        "schema": {
          "type": "string"
        },
        "example": "1Dd4iN_ClKn5jl-xPC36snQ4s9Zd5GZnXCQuCNSKcVE",
        "description": "The authentication token."
      },
      "x-2fa-code": {
        "name": "x-2fa-code",
        "in": "header",
        "schema": {
          "type": "string"
        },
        "description": "The 2FA code. This parameter is required if 2FA is enabled in your workspace. See the <a href=\"https://developer.rocket.chat/apidocs/introduction-to-two-factor-authentication\" target=\"_blank\">Introduction to Two-Factor Authentication</a> document for details."
      },
      "X-2fa-method": {
        "name": "x-2fa-method",
        "in": "header",
        "schema": {
          "type": "string"
        },
        "description": "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."
      }
    }
  }
}
````

