Hello, I am facing a problem with the login function of the widget js api.
Show this message error:
This is my code inside the Embed add function:
(function(){
var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0];
s1.async=true;
s1.src='https://embed.tawk.to/' + idPropriedadeWidget + '/' + idWidget;
s1.charset='UTF-8';
s1.setAttribute('crossorigin','*');
s0.parentNode.insertBefore(s1,s0);
window.Tawk_API.login({
hash: '',
'userId': userId,
name,
email
}, function(error) {
console.log('Tawk API login callback', error);
})
This is my code before the function to add the Embed:
var Tawk_API = window.Tawk_API||{};
var Tawk_LoadStart=new Date();
window.Tawk_API.login(
{
hash: '',
'userId': userId,
name,
email
}, function(error) {
console.log('Tawk API login callback', error);
}
)