Medos Booking Docs

Troubleshooting

Common issues and how to fix them.

Nine out of ten integration issues fit one of these patterns. Skim the headings — if one matches, follow the fix.

The widget doesn't render at all

Is the script loaded? In DevTools → Network, check that unified.js returned 200. If it didn't, the CDN URL is wrong or blocked by a CSP rule.

Is MedosBooking defined? In the Console tab, type MedosBooking and press Enter. If it says "undefined", the script hasn't loaded or threw a parse error.

Is init() being called? Search your bundle for MedosBooking.init. If the call sits inside a <script type="module">, make sure the bundle loads first.

Any errors in the console? onError might have fired with an API error and you don't have a handler wired up.

"Container element not found"

Inline mode couldn't find the <div> you named in containerId. Fixes:

  • Verify the id matches exactly, case-sensitive, no leading #.
  • Make sure the <div> exists in the DOM before you call init(). If your React app renders the container conditionally, wait for it to mount before initializing.

"API key is required" or "Invalid API key"

  • Check the key starts with mk_.
  • Verify the environment matches — test keys against test APIs, live keys against production.
  • Confirm you're not accidentally using an empty string (a common env-var typo). Log the value first if unsure.

Blank screen inside the widget

Usually a Content Security Policy issue. The widget needs to reach the Medos API — check your CSP for connect-src and add the API hostname.

If your site uses a strict CSP, you'll also need script-src to allow the CDN URL.

The theme doesn't apply

  • Confirm the theme value spells the built-in name correctly ("default" or "modern" — lowercase).
  • If you're passing a custom theme object, check the console for a missing-field warning.
  • If you're relying on auto-fetch, make sure the workspace has a theme configured in the dashboard.

OTP never arrives

  • The patient's phone number's country code must be included (e.g. +1, +91).
  • SMS delivery goes through the platform's provider — if delivery is systematically failing for a region, contact support.
  • In test mode, real SMS isn't sent — the test API returns a fixed OTP. See Test vs live mode.

Slots look wrong / empty

  • Check that the doctor has availability configured for the date range.
  • Consultation types matter — a doctor with only "online" availability won't show slots when the widget is filtered to "offline".
  • If the whole calendar is empty, the doctor might be inactive or missing a public profile — see Doctor visibility.

The success auto-close is 3 seconds. This is not currently configurable. If you need to control the timing (e.g. suppress the auto-close and keep the confirmation on screen), use inline mode instead — inline never auto-closes.

Still stuck

If none of the above matches, capture the following before reaching out:

  1. The exact MedosBooking.init(...) call you're making.
  2. The output of MedosBooking in the browser console.
  3. Any onError message you see.
  4. Browser + version, framework + version.

That's usually enough for support to diagnose in one round-trip.

On this page