The LIVE CHAT libre web API

In addition to being able to embed your live chat channel on your own website, and access them from any Android device, you can also access your channel through the LIVE CHAT libre web API. The web API gives you the advantage of having complete control of your channel's client interface.

You can use the web API to access your channel from your own website through JavaScript, PHP or any other language. You can also use the web API to create your own mobile application to access your channel, such as an Android or iOS application.

A web API, is a set of HTTP GET/POST URI's that allow sending and receiving of message data. When you browse a website, your browser makes a series of HTTP GET/POST requests to URIs that return HTML content. In a web service the URIs return XML or JSON data, instead of HTML content.

Parameters

OPTIONAL: The ID of the user. The user must be registered with FORUMS libre. If not passed the user will be anonymous. The user is required if the forum is private.

password

OPTIONAL: The password of the user. A token can also be used.

token

OPTIONAL: The token of the user. A token can be obtained through check-user, and is valid until reset.

id

REQUIRED: The ID of the channel to validate. The channel's name can also be used, but the ID is better as it is guaranteed to be unique.

name

REQUIRED: The name of the channel to validate. The channel's ID can also be used.

XML POST Example

Web Socket API

The web socket API uses web sockets to communicate with the LIVE CHAT libre server. Most web browsers support web sockets from JavaScript, you can also get free open source web socket implementations for most programming languages, and mobile platforms.

Here is some example web socket code using JavaScript in a web browser. It assumes an HTTP connection has already been made to the LIVE CHAT libre server. If you have not connected to a channel through a web session, you can still establish a connection. Once you establish a connection, you will need to send a text message to connect to a channel of the form "connect channel-id user password application-id".

So, that is the basic web API. You can now build your own interface for your channel. You can use the API on your own website, or in your own mobile application.