curl --request GET \
--url https://api.example.com/api/rooms \
--header 'Authorization: <authorization>'{
"rooms": [
{
"room_id": 123,
"name": "<string>",
"joined": true
}
]
}Get a list of all public chat rooms
curl --request GET \
--url https://api.example.com/api/rooms \
--header 'Authorization: <authorization>'{
"rooms": [
{
"room_id": 123,
"name": "<string>",
"joined": true
}
]
}{
"error": "missing token"
}
{
"error": "unauthorized"
}
curl -X GET https://api.mirage.com/api/rooms \
-H "Authorization: your-auth-token"
{
"rooms": [
{
"room_id": 1,
"name": "General Discussion",
"joined": true
},
{
"room_id": 2,
"name": "Tech Talk",
"joined": false
},
{
"room_id": 5,
"name": "Random",
"joined": true
}
]
}
is_private=0) are returned.joined field helps clients display which rooms the user is already a member of.