Creating a Call Link

This tutorial assumes a server-to-server integration with Jabber Guest. As customer authentication mechanisms will vary, this tutorial will assume Basic HTTP Authentication.

REST URI

The REST URI for Jabber Guest is: /cjg-api/rest/links.

For example if a Jabber Guest service is set up at a hostname jabberguest.example.com, we would be making our requests to: https://jabberguest.example.com/cjg-api/rest/links

REST Methods

HTTP Method Action
POST Create a link
DELETE Delete a link

Custom Parameter Values

If end-user provided values are needed before creating a link, a web-form could be used.

For example, if a user "Robert" prefers to go by "Bob" instead, we could give him the opportunity to set this with a text field like so:

  <p>
    <label for="myPreferredName">Display my name as:</label>
    <input type="text" id="myPreferredName" name="myPreferredName"></input>
  </p>

This value could then be passed along to your server-side via AJAX like so (we're assuming the use of jQuery here):

var postData = {
    callerName: $('#myPreferredName').val()
};

$.ajax({
  type: 'POST',
  url: '/createlink',  // <-- your server-side handler which POSTs to Jabber Guest
  data: postData,
  success: function () {
    console.log('Link created!');
  }
});

Server-side Discussion

See more about the server-side discussion here