Skip to content

REST API Reference

Use the REST API and the project's Private Key to make remote requests from your own server to any room's server-side command.

How to create a Private Server Command: Private Server Command

Restrictions: You can call any method inside the room, but the $session variable is not available in that case.

Call Private Server Command inside the room

  • URL: https://«Project-Access-Point-URL»/room/call
  • Method: POST
  • Headers:
Content-Type: application/json
Authorization: <Project-Private-Key>
  • Body:
json
{
   "alias": "<room-alias>",
   "id": "<room-id>",
   "command": "<command-name>",
   "params": {
       "param1": "value1",
       "param2": "value2"
   }
}

Request sample:

bash
curl -X POST 'https://<Project-Access-URL>/room/call' \
         -H 'Authorization: <Project-Private-Key>' \
         -H 'Content-Type: application/json' \
         -d '{
             "alias": "SomeRoom",
             "id": "1234",
             "command": "StartGame",
             "params": {
                 "title": "New Game"
             }
         }'