...
Code Block | ||
---|---|---|
| ||
$(document).ready( function() { $.getScript("https://mywebsite.com/livechat/:domain/lib/livechatagentsdk.js") .then( function() { // Initialize the CTLive SDK return LIVECHATSDK.SDK.init("https://mywebsite.com/livechat/:domain/") } ).then( function() { // Login the agent to CTLive (in this example password is not required) return LIVECHATSDK.LIVECHAT.login( { "nickname": "Agent1", "isAgent": true, "id": "USER_AGENT1", "channel": "web" } ); } ).catch( function(err) { console.error(err); } ); } ); |
...