curl --request POST \
--url https://api.example.com/api/join_room \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"password": "<string>"
}
'{
"message": "<string>",
"room_id": 123,
"room_name": "<string>"
}Join an existing chat room
curl --request POST \
--url https://api.example.com/api/join_room \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"password": "<string>"
}
'{
"message": "<string>",
"room_id": 123,
"room_name": "<string>"
}{
"error": "missing room name or token"
}
{
"error": "unauthorized"
}
{
"error": "room not found"
}
{
"error": "password required"
}
{
"error": "wrong password"
}
curl -X POST https://api.mirage.com/api/join_room \
-H "Authorization: your-auth-token" \
-H "Content-Type: application/json" \
-d '{
"name": "General Discussion"
}'
curl -X POST https://api.mirage.com/api/join_room \
-H "Authorization: your-auth-token" \
-H "Content-Type: application/json" \
-d '{
"name": "Secret Club",
"password": "secure-password"
}'
{
"message": "john_doe joined room \"General Discussion\"",
"room_id": 42,
"room_name": "General Discussion"
}
joined_at timestamp.