/
How to fix "Error while initializing chat settings"

How to fix "Error while initializing chat settings"

This guide explains how to resolve the issue where the Chat Widget fails to load on your website, and the following Axios error appears in the browser console :

  • Error Code: ERR_BAD_REQUEST

  • Message: Request failed with status code 403

  • Name: AxiosError

image-20241128-154750.png
image-20241202-160625.png

Understanding the error

A 403 status code indicates that the server understood your request but refused to process it. This typically happens if the website you are trying to use the Chat Widget on is not listed in the Trusted URLs section of your Chat for JSM settings.

Why does this happen?

The Chat Widget is designed to display only on websites specified in the Trusted URLs section, ensuring better security.

image-20241216-142004.png

If your website is not added to this list, the widget won’t load, and you’ll encounter the following error:

image-20241128-154750.png

Solution

Follow these steps to resolve the issue:

  1. Open the project settings, click Chat for JSM, and navigate to Chat Widget settings.

    image-20241216-142425.png
  2. Ensure that the Show Chat Widget on website option is toggled on.

  3. Check the Trusted URLs section. Verify that all websites where you intend to use the Chat widget are listed. If any websites are missing, add them to the Trusted URLs list.

If you use the Chat Widget on multiple websites, ensure that both URLs are added to the Trusted URLs section. If one is missing, the widget will fail to load, and you’ll encounter the 403 error.

  1. After making updates, save your settings.

Once you’ve updated the Trusted URLs, the Chat widget should load without any errors.

image-20241216-143301.png

 

 

 

Related content