Javascript API
The Javascript API is designed to develop sophisticated applications that directly and natively interact with the IPCortex Communication System (CS).
It can do just about anything on behalf of a user: initiating and terminating phone calls; starting chats; reading and writing chat messages; and initiating multimedia sessions in the browser. Really, it can do anything keevio can do and more, limited only by your imagination.
IMPORTANT: Due to modern browser security requirements, it is not possible to simply load an HTML file from a directory and import the API files from there. The file:// scheme is not considered secure, and therefore it cannot communicate and access https:// secured files, including the login process. Instead consider starting up a simple HTTPS server, or running the API under NodeJS. It is aso possible to set up tests and examples on
JSFiddle.
Success callbacks
Many methods will specify that they return a Promise
as a means of reporting a result; Largely for legacy support, some object methods will return immediately with a success or failure indication. Most will have to carry out some background function to determine whether a request can be completed, so a callback is utilised to feed back the result.
Where a callback is indicated, and not otherwise expanded on, the callback function takes the form:
callback(success, message)
where:
Parameter |
Type |
Description |
success |
Boolean |
Was the call successful. |
message |
String |
More information specific to the call. |