> For the complete documentation index, see [llms.txt](https://docs.mews.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mews.com/booking-engine-guide/booking-engine-widget/troubleshooting.md).

# Troubleshooting

## Booking Engine shows an error "api.mews.com refused to connect"

### Fault description

The browser says it can't open the page because of security, or there's a console error mentioning `api.mews.com` and `X-Frame-Options`.

**Example 1 (Chrome browser):**

![api.mews.com refused error Google Chrome](https://3970029030-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNQLFOBK71zKQNjl5UEnW%2Fuploads%2Fgit-blob-108fe5738d60aa9da9dc3705be53c575ed871b77%2Fapi-mews-com-refused-connect-chrome.png?alt=media)

**Example 2 (Firefox browser):**

![api.mews.com refused error Mozilla Firefox](https://3970029030-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNQLFOBK71zKQNjl5UEnW%2Fuploads%2Fgit-blob-a0fa6318ecedf3ba38f58ad414b78837d2754f8a%2Fapi-mews-com-refused-connect-firefox.png?alt=media)

**Example 3 (Console errors):**

* `[Error] Refused to display 'https://api.mews.com/distributor' in a frame because it set 'X-Frame-Options' to 'sameorigin'.`
* `The loading of "https://api.mews.com/distributor" in a frame is denied by "X-Frame-Options" directive set to "sameorigin".`

### Fault explanation

The Booking Engine Widget is not working because it is not installed correctly on your page. Installing the Booking Engine Widget in any other way than as described in this Guide is not supported and can cause errors such as "api.mews.com refused to connect".

You can try to confirm the Booking Engine Widget is not installed correctly by inspecting the DOM of the page, as follows:

* Open the page with the Booking Engine Widget and make it show the error
* Open your browser developer tools with 'DOM/elements inspector'
* In the inspector, look for any tags like `<iframe src="https://api.mews.com/distributor/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee">`
* There shouldn't be any iframe tag with a `src` attribute pointing to the `api.mews.com` domain. If you find something like that, the problem could be in the way the Booking Engine Widget is installed. And even if you didn't find anything like that, it's better to check if the Booking Engine Widget is installed correctly.

### How to fix it

First decide if you want to use Booking Engine Standalone or Booking Engine Widget (see [Ways to integrate](/booking-engine-guide/faq/ways-to-integrate.md)). Then go through the relevant installation guide and make sure your page and code is doing everything correctly:

* [Booking Engine Standalone - Getting started guide](/booking-engine-guide/booking-engine-standalone/getting-started.md)
* [Booking Engine Widget - Getting started guide](/booking-engine-guide/booking-engine-widget/getting-started.md)

If you are using the Booking Engine Widget, pay special attention to the [Requirements](/booking-engine-guide/booking-engine-widget/getting-started.md#requirements) section of the Booking Engine Widget Getting started guide, it has a list of things to do and a list of common mistakes that can occur during installation.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.mews.com/booking-engine-guide/booking-engine-widget/troubleshooting.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
