Versions Compared

Key

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

Performs SSO login.

Look at CTLive Agent Login and Logout for more information

Parameters:

Name

Mandatory

Type

Description

jwt_token

Status
titleNO

Status
titlestring

A json web token to perform authentication.

enableVideo

Status
titleno

Status
titleboolean

Flag to enable video operations for the agent

enableBlur

Status
titleno

Status
titleboolean

Flag to enable video blur for the agent

callbackFN

Status
titleno

Status
titleJS function

Callback function to be notified when logout from CTLive is performed. It returns the logout reason that can be one of the following strings:

  • explicitLogout

  • keepaliveExpired

Returns:

Type

Description

JS Promise

A Javascript Promise that returns an object with the result of the login request.

Example:

Code Block
languagejs
LIVECAHT.login(null, false, false, myCB)
.then(function (data) {
  console.log("[CTLIVE WIDGET] Login", data);
})
.catch(function () {
  console.log("[CTLIVE WIDGET] [ERROR] Login");
});

function myCB (reason) {
    console.log("Logout from CTLive with reason " + reason);
  };