Get Room Information
- Print
- DarkLight
- PDF
Get Room Information
- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Get
/api/v1/rooms.info
Retrieves the information about the room.
Changelog
Version | Description |
---|---|
0.72.0 | Added |
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
}
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?