Get Users Presence
- Print
- DarkLight
- PDF
Get Users Presence
- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Get
/api/v1/users.presence
If the Presence_broadcast_disabled
setting is true, the endpoint returns an empty array.
Changelog
Version | Description |
---|---|
1.1.0 | Added |
Header parameters
X-User-Id
stringRequired
The authenticated user ID.
ExamplerbAXPnMktTFbNpwtJ
X-Auth-Token
stringRequired
The authenticated user token.
ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
Query parameters
from
string
The last date when the status was changed. Format: ISO 8601 datetime. Timezone, milliseconds and seconds are optional. If you don't pass from
parameter, you'll get a list of all users' presence and the result will have a full
field with value true
.
Example2019-05-22T12:11:45.392Z
ids
string
The user IDs whose status you want.
ExampleJ4sWseCgs8eEnWvhE
Responses
200
Success Example
{
"users": [
{
"_id": "rocket.cat",
"name": "Rocket.Cat",
"username": "rocket.cat",
"status": "online",
"utcOffset": 0,
"avatarETag": "5BB9B5ny5DkKdrwkq"
},
{
"_id": "rocketchat.internal.admin.test",
"name": "RocketChat Internal Admin Test",
"username": "rocketchat.internal.admin.test",
"status": "online",
"utcOffset": -2,
"avatarETag": "iEbEm4bTT327NJjXt"
}
],
"full": true,
"success": true
}
object
users
Array of object
object
_id
string
name
string
username
string
status
string
utcOffset
integer
avatarETag
string
full
boolean
success
boolean
401
Unauthorized
Authorization Error
{
"status": "error",
"message": "You must be logged in to do this."
}
object
status
string
message
string
Was this article helpful?