Set User Presence (Realtime)

Prev Next

Set the user presence status. By default, there are four different statuses available in your workspace:

  • online

  • busy

  • away

  • offline

To change a user's default status, use Set User Status in the REST API. The UserPresence:setDefaultStatus method was removed in Rocket.Chat 9.0.0.

Set temporary user presence status

To set a temporary status, send a request to UserPresence:{status} with empty parameters. It only accepts either of these two status options: away and online. It is particularly useful when the client detects that the user is currently not actively using the application (thus "away") and when the user returns, indicating they are "online" again.

Method

Requires Auth

UserPresence:away

Yes

UserPresence:online

Yes

Example call

{
    "msg": "method",
    "method": "UserPresence:away",
    "id": "47",
    "params":[]
}

Example response

{
    "msg": "result",
    "id": "47",
    "result": true
}