The following are methods for controlling the chat widget:
Mount or demount the widget from the window.
SinchSdk.Chat.mount({configuration})
SinchSdk.Chat.demount()
Open or close the chat window or configure it so it can be toggled.
SinchSdk.Chat.open()
SinchSdk.Chat.close()
SinchSdk.Chat.toggle()
Send a message over the chat widget.
SinchSdk.Chat.send("text")
The user session along with certain configuration parameters is stored in the browser storage. If you want to clear it, use:
SinchSdk.clear()
When you are finished with the SDK, clear the SDK memory including the saved token for authorization with the following method:
SinchSdk.terminate()