An additional license is required to access Omnichannel for Customer service.
For more information, see the Dynamics Customer Service pricing overview and Dynamics Customer Service pricing plan pages. Sets the authentication token provider.
The authentication token provider function, when called with a callback function as a parameter, invokes the callback function with a valid JSON Web Token JWT string as the argument. This method raises an error if the value of the authTokenProvider parameter is not a function.
Important In beispieltoken payload of the JWT token, the value provided for lwicontexts key should be the serialized custom beispieltoken. Only primitive values are allowed for any key.
The keys of beispieltoken context must correspond to context variables that are created for the associated work stream in Omnichannel for Customer Service.
The authentication token provider would be invoked by live chat widget when starting a new chat. Note Listen to the lcw:ready event raised by a live chat before calling the live chat SDK methods.
The live chat methods should be invoked after the lcw:ready event is raised. You can listen for this event beispieltoken adding your own event listener on the window object.
This SDK is applicable only if authentication is enabled for the widget. To enable authentication for your widget, see Create chat authentication settings.