When Web SDK widget is created. Usually this happens when you click the
launcher.
You can use this event to send authentication token:
constujet=newUJET({//...//authenticate:getAuthToken})//whenyoudidn't use `authenticate` option, you need to call// `.authenticate` method manuallyujet.on('created,()=>{fetch('/token').then(resp=>{returnresp.json()}).then(data=>{ujet.authenticate({token:data.token})})})
authorized
This event happens when .authenticate method is called and responded
with a token to Web SDK.
ready
Web SDK has fetched company information, it is ready to use now.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-05 UTC."],[[["`ujet.on()` and `ujet.off()` are used to manage event listeners for the Web SDK."],["The `created` event is triggered when the Web SDK widget is created, and it can be used to send an authentication token."],["The `authorized` event occurs after the `.authenticate` method is called and responds with a token."],["The `ready` event indicates that the Web SDK has fetched company information and is fully functional."],["The `unread` event is emitted to communicate the number of unread chat messages, while the `close` event signifies that the Web SDK has been closed."]]],[]]