Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Below we list all the available APIs related with a code example. The APIs are related to an istance of active chat, for example the same object returned by calling the joinContact method.

Send a Text message

Code Block
languagejs
ctlive_contact.sendMessage("Hello world!").then(
  function (msgid) {
    console.log("Message sent", msgid);
  }
);

...

Terminate an active chat

Code Block
languagejs
// End a chat and disconnect all participant.
// The first parameter is the instance of a CTLive active chat.
// The second parameter is reserved and assigned to false
LIVECHATSDK.LIVECHAT.endContact(ctlive_contact, false);

Leave an active chat

Code Block
languagejs
LIVECHATSDK.LIVECHAT.leave("CHAT_eaa2e7c0-9c26-40db-b720-d777ab68078d");