Retrieve list of all chat rooms

Learn how to retrieve the list of all chat rooms using iFlyChat REST API

post
Get the list of all chat rooms

https://api.iflychat.com/api/1.1/rooms/list
You can use iFlyChat API to programmatically retrieve the list of all chat rooms.
Request
Response
Request
Path Parameters
api_key
required
string
The private API key of your website
Response
200: OK
It would contain room_id, room_name, room_role and room_private for all rooms of your website. It also contains length (count) of the total chat rooms.
{
"rooms": [
{
"room_id": 1,
"room_name": "test1",
"room_role": "1",
"room_private": "0",
"room_moderate": "0"
},
{
"room_id": 2,
"room_name": "test2",
"room_role": "1",
"room_private": "0",
"room_moderate": "0"
},
{
"room_id": 3,
"room_name": "test3",
"room_role": "1",
"room_private": "0",
"room_moderate": "0"
}
],
"length": 3
}

Curl Command

This the sample curl command required to make HTTP request:

curl -H "Content-Type: application/json" -X POST https://api.iflychat.com/api/1.1/rooms/list -d "{\"api_key\":\"Wr4vpoJ_ET3lpBdX9E9TutUic4Dgb-gc7RGzuZvKqZgW5\"}"