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
info
The auth
query parameter is your private key. You can find it in your Dashboard under Developer -> Private Key.
Get Presence | Description | |
---|---|---|
Path | ||
roomId | string | Chat Room roomId for which you want to fetch the online users |
Query | ||
end | number | default:150 |
start | number | default:0 |
auth | string | Go to Dashboard -> Developer -> Private Key is your auth |
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"
}