Get Users Presence
    • Dark
      Light
    • PDF

    Get Users Presence

    • Dark
      Light
    • PDF

    Article summary

    Get
    /api/v1/users.presence

    If the Presence_broadcast_disabled setting is true, the endpoint returns an empty array.

    Changelog

    VersionDescription
    1.1.0Added
    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
    }
    Expand All
    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?

    What's Next
    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.