Get Online Group Users

Lists all online users of a group/channel if the group's ID is provided; otherwise, it gets all online users of all groups.

HTTP MethodURLRequires Auth

GET

/api/v1/groups.online

Query Parameters

KeyExample ValueDescription

query

{"_id":"5HmCfpoB7jp2uibTC"}

The group ID for which you want to retrieve online users. See Query Parameters.

Example Call

Without query parameter:

curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
     -H "X-User-Id: aobEdbYhXfu5hkeqG" \
http://localhost:3000/api/v1/groups.online

With query parameter:

curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
     -H "X-User-Id: aobEdbYhXfu5hkeqG" \
http://localhost:3000/api/v1/groups.online?query={"_id": "5HmCfpoB7jp2uibTC"}

Example Response

{
  "online": [
    {
      "_id": "47cRd58HnWwpqxhaZ",
      "username": "test"
    },
    {
      "_id": "BsxzC22xQ43taWdff",
      "username": "uniqueusername"
    }
  ],
  "success": true
}

Change Log

VersionDescription

0.52.0

Added

Last updated

Rocket.Chat versions receive support for six months after release.