Get Room Information
    • Dark
      Light
    • PDF

    Get Room Information

    • Dark
      Light
    • PDF

    Article summary

    Get
    /api/v1/rooms.info

    Retrieves the information about the room.

    Changelog

    VersionDescription
    0.72.0Added
    Header parameters
    X-User-Id
    stringRequired

    The userId of the authenticated user.

    ExamplerbAXPnMktTFbNpwtJ
    X-Auth-Token
    stringRequired

    The authToken of the authenticated user.

    ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
    Query parameters
    roomId
    string

    The room id. It is required if the roomName is not provided.

    Exampledlpfuijw7ej
    roomName
    string

    The room name. It is required if the roomId is not provided.

    Examplegeneral
    fields
    string

    This parameter accepts a JSON object with properties that have a value of 1 or 0 to include or exclude them in the response. For example, to only retrieve the usernames of users: fields={ "username": 1 }

    Responses
    200

    OK

    Success
    {
      "room": {
        "_id": "GENERAL",
        "ts": "2024-02-14T14:34:49.365Z",
        "t": "c",
        "name": "general",
        "usernames": [],
        "msgs": 55,
        "usersCount": 36,
        "_updatedAt": "2024-07-16T08:49:34.732Z",
        "u": {
          "_id": "rocket.cat",
          "username": "rocket.cat",
          "name": "Rocket.Cat"
        },
        "default": true,
        "lastMessage": {
          "_id": "668fc2bbffe932842327c1ff",
          "t": "discussion-created",
          "rid": "GENERAL",
          "ts": "2024-07-11T11:32:11.220Z",
          "msg": "Discussion",
          "u": {
            "_id": "5m4hjvzChTRCqwPrD2",
            "username": "Rama",
            "name": "Raghav Ram"
          },
          "groupable": false,
          "drid": "668fc2bbffe932842327c1fd",
          "_updatedAt": "2024-07-11T11:32:11.220Z"
        },
        "lm": "2024-07-11T11:32:11.220Z"
      },
      "success": true
    }
    Expand All
    object
    room
    object
    _id
    string
    ts
    string
    t
    string
    name
    string
    usernames
    Array of object
    object
    msgs
    integer
    usersCount
    integer
    _updatedAt
    string
    u
    object
    _id
    string
    username
    string
    name
    string
    default
    boolean
    lastMessage
    object
    _id
    string
    t
    string
    rid
    string
    ts
    string
    msg
    string
    u
    object
    _id
    string
    username
    string
    name
    string
    groupable
    boolean
    drid
    string
    _updatedAt
    string
    lm
    string
    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?

    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.