Closed gacortezia closed 4 years ago
Hi
This is not an easy answer. The 500 error is from the backend system. It could be the Token and the channel id is wrong. It could be a security issue. The code you have above show it is point to the production WebChat and not a local version. I have tried the script on product and it is working. Try using the script in the connect tab (using something like jsbin)
Hope this helps
Hi John,
Thanks you for your help. This week I tried to run the application again and It worked without any change. I believe that there were some issue in CAI server side.
Thank you.
Hello, I implemented a very simple Webchat with SAP CAI. After generate the connection informationg I just included into my SAPUI5 app with the following code:
` if (!document.getElementById("cai-webchat")) { var s = document.createElement("script"); s.setAttribute("id", "cai-webchat"); s.setAttribute("src", "https://cdn.cai.tools.sap/webchat/webchat.js"); s.setAttribute("channelId", "Channed Id Goes Here"); s.setAttribute("token", "Token Goes Here"); document.body.appendChild(s); }
` The icon appeared into my page but when I try to submit a message the chat shows "Couldn’t send this message" the error "Error: Request failed with status code 500" is displayed in the console.
Anyone has an idea of what is wrong?
Regards.