Quick Start Guide - XirSys BETA

Follow
  • Version: 1.0
  • Author: Jerry Chabolla
  • Date: 10 July, 2013

Step 1: Create a Room

Your application will need a unique connection point to our service, this is easily done through the Domains section in the XirSys dashboard:

 1.png

 

The first time you enter the Domains page you will see the “Create New Domain” button. Click on the button and enter a valid domain name:

2.png

 

 Once you have your domain space, you can create a unique application name to separate your apps as well as unique room names within your application to separate and manage your user connections:

3.png

 

In this test we will just use the "default" app and room that it automatically creates for us when we created a domain:

 

Apps

4.png

 

Room:

5.png

 

Step 2: Generate and Copy the Secret Token

Note: The Xirsys services utilizes a “secret token” pattern which should ONLY be implemented in a secure environment such as a server-­side application or a compiled client application. However, for the sake of simplicity, we are ignoring that rule for this tutorial and we will authenticate from our CLIENT application directly using a JQuery POST call and our secret and room info.


Click on “Dashboard” at the top of the Xirsys.com page to return to the main page, then locate the panel labeled “Secret Token for API Authentication”.  There should already be a token generated, this Secret Token will be used to authenticate our user.

Here is the information we will need to connect to our service:

  • domain:  "yourdomain.com"
  • room:  "default"
  • application: "default"
  • ident: [Your Account Username]
  • secret: [Your Account Secret Token]

 

Step 3: Get ICE

To request an ICE string, the calling application needs to make a POST request to the URL:

POST:

Create a post call to “http://beta.xirsys.com:8889/getIceServers” and send it our account information and secret.  

Note: This call is not performed over SSL. Encryption will be implemented shortly after beta.

 

This authentication should be done in a secure environment, this is only for quick testing:

$(document).ready(function(){
   $.post("http://beta.xirsys.com:8889/getIceServers",
   {
      domain: "www.xirsys.com",
      room: "default",
      application: "default",
      ident: "jerry",
      secret: "4b14b221-a57d-3360-c280-90ce0ed321e2"
   },
   function(data,status){
      alert("Data: " + data + "\nStatus: " + status);
   });
});

 

Result:

{
   "p":"/getIceServers",
   "s":200,
   "d":{
      "iceServers":[
      {"url":"stun:72.70.70.70"},
      {"url":"turn:95268d7d­3725­4a67­5a55­d1b846a41829@72.70.70.70","credential":"6698f010­7165­49d0­9aae­64130d58a24d"}]
   },
   "e":null
}

 

Have more questions? Submit a request

Comments

Powered by Zendesk