Performs SSO login.
Look at CTLive Agent Login and Logout for more information
Parameters:
Name | Mandatory | Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
jwt_token |
|
| A json web token to perform authentication. | ||||||||
enableVideo |
|
| Flag to enable video operations for the agent | ||||||||
enableBlur |
|
| Flag to enable video blur for the agent | ||||||||
callbackFN |
|
| Callback function to be notified when logout from CTLive is performed. It returns the logout reason that can be one of the following strings:
|
Returns:
Type | Description |
---|---|
JS Promise | A Javascript Promise that returns an object with the result of the login request. |
Example:
Code Block | ||
---|---|---|
| ||
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); }; |