Retrieve list of all users online in a chat room
Learn how to use iFlyChat API to get the list of all online users in a global or private chat room
List of users online in a chat room
POST
https://api.iflychat.com/api/1.1/room/:id/users
iFlyChat API to get the list of online users in a global or private chat room
Path Parameters
Name
Type
Description
id
string
The id of the chat room
Request Body
Name
Type
Description
api_key
string
The private API key of your website
{
"users": [
{
"user_id": "1",
"user_role": "admin",
"user_name": "shashwat",
"user_status": "1",
"user_avatar_url": "/sites/default/files/styles/thumbnail/public/pictures/picture-1-1427288050.jpg?itok=glXtBjnp",
"user_profile_url": "javascript:void(0)"
},
{
"user_id": "2",
"user_role": "admin",
"user_name": "shubham",
"user_status": "1",
"user_avatar_url": "/sites/all/modules/drupalchat/themes/light/images/default_avatar.png",
"user_profile_url": "javascript:void(0)"
},
],
"length": 2
}
Curl Command
Here is the sample curl command required to make HTTP request:
curl -H "Content-Type: application/json" -X POST https://api.iflychat.com/api/1.1/room/5/users -d "{\"api_key\":\"Wr4vpoJ_ET3lpBdX9E9TutUic4Dgb-gc7RGzuZvKqZgW5\"}"
Last updated
Was this helpful?