Open abhatikar opened 3 years ago
@abhatikar There is currently no client API, but you can use curl for creating a room:
# Do a GET request and parse the CSRF token
csrf_token=$(curl \
-c cookies.txt \
-b cookies.txt \
localhost:5000/ | \
grep csrf_token | \
grep -Po 'value="\K[^"]*'
)
# Do a POST request to create the room
curl \
-c cookies.txt \
-b cookies.txt \
-X POST \
-F "room_name=Test Room" \
-F "password=hello" \
-F "public=Yes" \
-F "guest_limit=10" \
-F "csrf_token=$csrf_token" \
localhost:5000/
Assuming you have a Camus server running at localhost:5000
, the above commands will create a public room called "Test Room" with a password "hello" and a guest limit of 10.
Suppose i have a server running, can i invoke a client from a script to create a room? Basically can i run it headless.? Thanks in advance