> ## 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 Current User Sessions
>
Retrieves all sessions of the authenticated user making the request.
### Changelog
| Version | Description |
| ---------------- | ------------|
|5.0.0 | Added |
## OpenAPI
````json GET /api/v1/sessions/list
{
"openapi": "3.0.0",
"info": {
"version": "1.0.0",
"title": "Settings"
},
"servers": [
{
"url": "https://apiexplorer.support.rocket.chat"
}
],
"tags": [
{
"name": "Settings"
},
{
"name": "Audit"
},
{
"name": "Cloud"
},
{
"name": "DNS"
},
{
"name": "E2E"
},
{
"name": "Import"
},
{
"name": "Bulk User Import"
},
{
"name": "Instances"
},
{
"name": "Federation"
},
{
"name": "Moderation"
},
{
"name": "Device Management"
},
{
"name": "Password policy"
},
{
"name": "Video Conference"
},
{
"name": "Media Calls"
}
],
"paths": {
"/api/v1/sessions/list": {
"get": {
"summary": "Get Current User Sessions",
"operationId": "get-api-v1-sessions-list",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"sessions": {
"type": "array",
"items": {
"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"
},
"_id": {
"type": "string"
},
"current": {
"type": "boolean",
"description": "Whether the session belongs to the device making the request."
}
}
}
},
"total": {
"type": "integer"
},
"count": {
"type": "integer"
},
"offset": {
"type": "integer"
},
"success": {
"type": "boolean"
}
}
},
"examples": {
"Success Example": {
"value": {
"sessions": [
{
"sessionId": "QoYYFw2t9oKks2niG",
"userId": "rbAXPnMktTFbNpwtJ",
"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-23T16:33:45.202Z",
"_id": "QoYYFw2t9oKks2niG",
"current": "false"
},
{
"sessionId": "WJ2giBwm4B9mcojFi",
"userId": "rbAXPnMktTFbNpwtJ",
"device": {
"type": "mobile",
"name": "Chrome",
"longVersion": "112.0.0.0",
"os": {
"name": "Android",
"version": "10"
},
"version": "112.0.0"
},
"host": "localhost:3000",
"ip": "172.20.0.2",
"loginAt": "2023-05-23T12:43:52.023Z",
"_id": "WJ2giBwm4B9mcojFi",
"current": "false"
}
],
"total": "2",
"count": "50",
"offset": "0",
"success": "true"
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/authorizationError"
}
},
"description": "\n\nRetrieves all sessions of the authenticated user making the request.\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": "filter",
"description": "Filter sessions list using regex."
},
{
"$ref": "#/components/parameters/offset"
},
{
"$ref": "#/components/parameters/count"
},
{
"$ref": "#/components/parameters/sort"
}
]
}
}
},
"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."
}
}
}
}
}
}
},
"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."
},
"offset": {
"name": "offset",
"in": "query",
"required": "false",
"schema": {
"type": "integer"
},
"example": "50",
"description": "Number of items to \"skip\" in the query, i.e. requests return count items, skipping the first offset items. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#pagination) to learn more."
},
"count": {
"name": "count",
"in": "query",
"required": "false",
"schema": {
"type": "integer"
},
"example": "50",
"description": "How many items to return. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#pagination) to learn more."
},
"sort": {
"name": "sort",
"in": "query",
"required": "false",
"schema": {},
"description": "List of fields to order by, and in which direction. This is a JSON object, with properties listed in desired order, with values of 1 for ascending, or -1 for descending. For example, {\"value\": -1, \"_id\": 1}. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#pagination) to learn more."
}
}
}
}
````