> ## 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 Group Online Users
> Lists all online users of a particular group (private channel). You will not be able to view the users if you are not a member of this private channel, unless you have admin permissions.
### Changelog
| Version | Description |
| ------- | ----------- |
| 0.52.0 | Added |
|7.0.0 | Replaced `query` parameter with `_id` parameter |
## OpenAPI
````json GET /api/v1/groups.online
{
"openapi": "3.0.0",
"info": {
"version": "1.0.0",
"title": "Rooms"
},
"servers": [
{
"url": "https://apiexplorer.support.rocket.chat"
}
],
"tags": [
{
"name": "Channels"
},
{
"name": "Directory"
},
{
"name": "Groups"
},
{
"name": "Rooms"
},
{
"name": "Teams"
},
{
"name": "Room Invites"
},
{
"name": "Subscriptions"
},
{
"name": "ABAC"
}
],
"paths": {
"/api/v1/groups.online": {
"get": {
"tags": [
"Groups"
],
"summary": "Get Group Online Users",
"description": "Lists all online users of a particular group (private channel). You will not be able to view the users if you are not a member of this private channel, unless you have admin permissions.\n\n### Changelog\n| Version | Description |\n| ------- | ----------- |\n| 0.52.0 | Added |\n|7.0.0 | Replaced `query` parameter with `_id` parameter | ",
"operationId": "get-api-v1-groups.online",
"parameters": [
{
"$ref": "#/components/parameters/Auth-Token"
},
{
"$ref": "#/components/parameters/UserId"
},
{
"name": "_id",
"in": "query",
"description": "Enter the group's ID. You can find list of groups IDs using any of the following endpoints:\n* Get List of User Groups: This endpoint returns all private channels in the workspace, if you have the required permissions to view them.\n* Get Groups: This endpoint returns the private channels that you are a member of.",
"required": true,
"schema": {
"type": "string",
"example": "5HmCfpoB7jp2uibTC"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"online": {
"type": "array",
"items": {
"type": "object",
"properties": {
"_id": {
"type": "string"
},
"username": {
"type": "string"
}
}
}
},
"success": {
"type": "boolean"
}
}
},
"examples": {
"Success": {
"value": {
"online": [
{
"_id": "47cRd58HnWwpqxhaZ",
"username": "test"
},
{
"_id": "BsxzC22xQ43taWdff",
"username": "uniqueusername"
}
],
"success": true
}
}
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"error": {
"type": "string"
},
"errorType": {
"type": "string"
}
}
},
"examples": {
"Error if you are not a member of the private channel": {
"value": {
"success": false,
"error": "Not Allowed [error-not-allowed]",
"errorType": "error-not-allowed"
}
},
"Invalid or missing query parameter": {
"value": {
"success": false,
"error": "Invalid query"
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/authorizationError"
}
}
}
}
},
"components": {
"parameters": {
"Auth-Token": {
"name": "X-Auth-Token",
"in": "header",
"description": "The `authToken` of the authenticated user.",
"required": true,
"schema": {
"type": "string"
},
"example": "RScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f"
},
"UserId": {
"name": "X-User-Id",
"in": "header",
"description": "The `userId` of the authenticated user.",
"required": true,
"schema": {
"type": "string"
},
"example": "rbAXPnMktTFbNpwtJ"
}
},
"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."
}
}
}
}
}
}
}
}
}
````