Booking Engine Guide
  • Mews Booking Engine Guide
  • Booking Engine Standalone
    • Getting started
    • Deeplinks
  • Booking Engine Widget
    • Getting started
    • Use cases
      • Prerequisites
      • Testing in the Demo environment
      • Using your own Date inputs
      • Multiple enterprises and pre-selected locations
      • Disabling widget caching
    • Advanced guide
    • Reference
    • Troubleshooting
  • Booking Engine API
    • Usage guidelines
      • Authentication
      • Requests
      • Responses
      • Environments
      • Images
      • Supported currency codes
      • Supported language codes
    • Use cases
      • Availability blocks
      • On session payments
      • Payment card authorization
      • Supporting payment cards
    • API Operations
      • Availability blocks
      • Configuration
      • Hotels
      • Payment cards
      • Reservations
      • Reservation groups
      • Services
      • Vouchers
    • Deprecations
  • Integrations
    • Google Tag Manager
    • Google Triggers Reference
    • Google Tag Manager Configuration
    • Google Analytics cross-domain tracking
  • FAQ
    • Ways to integrate
    • Migration off the mews.li domain
  • Changelog
    • Changelog 2024
    • Changelog 2023
    • Changelog 2022
    • Changelog 2021
    • Changelog 2020
Powered by GitBook
On this page
  • Booking Engine shows an error "api.mews.com refused to connect"
  • Fault description
  • Fault explanation
  • How to fix it

Was this helpful?

  1. Booking Engine Widget

Troubleshooting

PreviousReferenceNextBooking Engine API

Last updated 2 years ago

Was this helpful?

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):

Example 2 (Firefox browser):

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 ). Then go through the relevant installation guide and make sure your page and code is doing everything correctly:

If you are using the Booking Engine Widget, pay special attention to the 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.

Ways to integrate
Booking Engine Standalone - Getting started guide
Booking Engine Widget - Getting started guide
api.mews.com refused error Google Chrome
api.mews.com refused error Mozilla Firefox
Requirements