Get
/api/v1/groups.online
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 |
Header parameters
X-Auth-Token
stringRequired
The authToken
of the authenticated user.
ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-Id
stringRequired
The userId
of the authenticated user.
ExamplerbAXPnMktTFbNpwtJ
Query parameters
_id
stringRequired
Enter the group's ID. You can find list of groups IDs using any of the following endpoints:
- Get List of User Groups: This endpoint returns all private channels in the workspace, if you have the required permissions to view them.
- Get Groups: This endpoint returns the private channels that you are a member of.
Example5HmCfpoB7jp2uibTC
Responses
200
OK
Success
{
"online": [
{
"_id": "47cRd58HnWwpqxhaZ",
"username": "test"
},
{
"_id": "BsxzC22xQ43taWdff",
"username": "uniqueusername"
}
],
"success": true
}
object
online
Array of object
object
_id
string
username
string
success
boolean
400
Bad Request
Error if you are not a member of the private channel
{
"success": false,
"error": "Not Allowed [error-not-allowed]",
"errorType": "error-not-allowed"
}
Invalid or missing query parameter
{
"success": false,
"error": "Invalid query"
}
object
success
boolean
error
string
errorType
string
401
Unauthorized
Authorization Error
{
"status": "error",
"message": "You must be logged in to do this."
}
object
status
string
message
string