Skip to main content

Get Presence

The Presence API is used to fetch the info about the number of users online in a Chat Room

https://api.deadsimplechat.com/consumer/api/v1/chatroom/:roomId/presence

Get Presence

Get info about the online users in the Chat Room

By default max 150 entries are returned, if you want to limit the entries or integrate with your paginationm system, then you can change the start and end values

Get PresenceDescription
Parameteres
Path
roomIdstringChat Room roomId for which you want to fetch the online users
Query
endnumberdefault:150
startnumberdefault:0
authstringauth token

Responses

200

JSON

{
"onlineUsers": 1,
"start": 0,
"end": 150,
"data": [
{
"_id": "5e332fac0a2a57014938a0b0",
"username": "bob",
"email": "user@example.com"
}
]
}

400

JSON

{
"message": "invalid chat room id"
}