MeetOne's appointment request form lets participants request an appointment with a specific professional directly from your website, by embedding it in an iframe. A professional confirms the request later; to let participants book a free slot themselves, use the online booking form.
Overview
The appointment request form can be embedded on any website using an iframe. It lets patients:
- Enter their personal information (name, email, phone)
- Select up to 4 preferred time slots
- Add an optional message for the doctor
- Accept the privacy policy and submit the request
The form emits JavaScript events under the meetone-appointment-form context that let you dynamically resize the iframe and react to user interactions.
In MeetOne this form is the appointment request integration (Integrations › Appointment requests). The slot-based online booking form under Integrations › Appointment booking is a different form, with its own URL and the context meetone-online-booking; it has its own guide: Embed the Online Booking Form.
Prerequisites
- A MeetOne tenant domain (for example
acme.meetone.io) with appointment requests enabled — Integrations › Appointment requests appears in the sidebar. - The booking token of the professional the requests go to, or your organization's token.
- The ability to add HTML and JavaScript to your website.
Getting the Integration URL
Copying it from MeetOne
The ready-made URL is in MeetOne, under Integrations › Appointment requests (Appointment Request — Direct Form Link and Appointment Request — iFrame Integration). Organization owners also find one URL for the whole organization and one per member there, under Appointment Request — Organization URLs. If you can't find it, contact MeetOne support (support@meetone.io).
Constructing the URL
The URL is built from a booking token — a professional's user_token, or your organization's token for a form addressed to the organization as a whole:
https://[your-tenant-domain]/appointment-bookings/[BOOKING_TOKEN]/new?iframe=true
Example:
https://acme.meetone.io/appointment-bookings/abc123def456/new?iframe=true
The iframe=true parameter activates the iframe layout. It removes the main navigation, applies iframe-specific styling, and shows a "Powered by MeetOne" footer. The page title is left out too, unless the form shows a header — the professional's photo or a personal message, or the organization's logo — which keeps its short heading.
Customize colors (optional)
To match the form to your website, append any of these URL parameters with a hex color value (#rgb or #rrggbb; encode # as %23). Values that are not valid hex colors are ignored, and without the parameters the default colors apply.
button_color– color of the submit button (the hover shade is derived automatically)button_label_color– text color of the button label (default: white)highlight_color– highlight color of the form fields (focus outline)
Example with a blue button and highlight color:
https://acme.meetone.io/appointment-bookings/abc123def456/new?iframe=true&button_color=%230066FF&highlight_color=%230066FF
Basic Integration
1. Add the following styles to your HTML document.
<style>
.meetone-appointment-booking {
max-width: 768px;
margin: 0 auto;
}
.meetone-appointment-booking iframe {
width: 100%;
border: none;
}
</style>
The iframe's height attribute (below) is only a starting point. Use the meetone.iframe-ready and meetone.iframe-resize events to set its actual height from the form content — and leave out a min-height, which would keep the iframe tall after the form has become shorter, for example once the thank-you message replaces it.
2. Add the iframe to your HTML document.
<div class="meetone-appointment-booking">
<iframe
id="appointment-booking-iframe"
src="https://acme.meetone.io/appointment-bookings/[USER_TOKEN]/new?iframe=true"
width="100%"
height="800">
</iframe>
</div>
JavaScript Events
The form runs on your MeetOne tenant domain, a different origin than your website, so it can't fire events on your page directly. Instead it sends each event to your page with postMessage. Listen for message events on window and read the event from event.data:
type— the event name, for example"meetone.iframe-resize"width— the form's current widthheight— the height the iframe needs to show the form without scrollingcontext— the context identifier ("meetone-appointment-form")
Always check event.origin against your tenant domain before using a message, and check context so you only react to the booking form.
meetone.iframe-ready
Sent when the form has finished loading — and again whenever it is rendered anew: after a submission that failed validation, and when the thank-you message replaces the form.
window.addEventListener("message", (event) => {
if (event.origin !== "https://acme.meetone.io") return;
if (event.data?.context !== "meetone-appointment-form") return;
if (event.data.type !== "meetone.iframe-ready") return;
console.log("Form ready:", event.data);
// event.data = {type: "meetone.iframe-ready", width: 768, height: 1200, context: "meetone-appointment-form"}
});
meetone.iframe-resize
Sent whenever the form's dimensions change — for example, when validation errors are displayed, form fields expand, the viewport changes, or the submission success message is shown. It carries the same width, height and context fields as meetone.iframe-ready.
window.addEventListener("message", (event) => {
if (event.origin !== "https://acme.meetone.io") return;
if (event.data?.context !== "meetone-appointment-form") return;
if (event.data.type !== "meetone.iframe-resize") return;
console.log("Form resized:", event.data);
// event.data = {type: "meetone.iframe-resize", width: 768, height: 1350, context: "meetone-appointment-form"}
});
Practical Example
A complete HTML page that sets the initial height when the form loads, adjusts the height dynamically as the form content changes, and avoids any internal scrolling:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Book an Appointment</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
margin: 0;
padding: 20px;
background-color: #f5f5f5;
}
.meetone-appointment-booking {
max-width: 768px;
margin: 0 auto;
background: white;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
overflow: hidden;
}
.meetone-appointment-booking iframe {
width: 100%;
border: none;
display: block;
}
.page-header {
text-align: center;
margin-bottom: 30px;
}
</style>
</head>
<body>
<div class="page-header">
<h1>Schedule Your Appointment</h1>
<p>Fill out the form below to request an appointment with Dr. Smith</p>
</div>
<div class="meetone-appointment-booking">
<iframe
id="appointment-booking-iframe"
src="https://acme.meetone.io/appointment-bookings/abc123def456/new?iframe=true"
width="100%"
height="800">
</iframe>
</div>
<script>
const iframe = document.getElementById("appointment-booking-iframe");
// Set the correct height when the form is ready, and again whenever it resizes
window.addEventListener("message", (event) => {
if (event.origin !== "https://acme.meetone.io") return;
const data = event.data;
if (!data || data.context !== "meetone-appointment-form") return;
if (data.type === "meetone.iframe-ready" || data.type === "meetone.iframe-resize") {
iframe.style.height = `${data.height}px`;
}
});
</script>
</body>
</html>
Embedding Multiple Booking Forms
If you need to embed booking forms for multiple doctors on the same page:
1. Use separate iframes with unique IDs.
<div class="meetone-appointment-booking">
<h2>Dr. Smith</h2>
<iframe
id="booking-form-smith"
src="https://acme.meetone.io/appointment-bookings/TOKEN_SMITH/new?iframe=true"
width="100%">
</iframe>
</div>
<div class="meetone-appointment-booking">
<h2>Dr. Jones</h2>
<iframe
id="booking-form-jones"
src="https://acme.meetone.io/appointment-bookings/TOKEN_JONES/new?iframe=true"
width="100%">
</iframe>
</div>
2. Use event.source to identify which iframe sent the message.
window.addEventListener("message", (event) => {
if (event.origin !== "https://acme.meetone.io") return;
const data = event.data;
if (!data || data.context !== "meetone-appointment-form") return;
if (data.type !== "meetone.iframe-ready" && data.type !== "meetone.iframe-resize") return;
document.querySelectorAll(".meetone-appointment-booking iframe").forEach((iframe) => {
if (iframe.contentWindow === event.source) {
iframe.style.height = `${data.height}px`;
}
});
});
Form Submission
When a patient successfully submits the appointment request:
- The form is replaced with a thank-you message.
meetone.iframe-readyand thenmeetone.iframe-resizeare sent with the new dimensions.- Your listener adjusts the iframe to the success message.
- An email notification is sent to the doctor.
The submission is saved as an appointment request, which the doctor can confirm later from the MeetOne dashboard.
Security Considerations
Content Security Policy
If your website uses a Content Security Policy (CSP), allow iframes from your MeetOne tenant domain:
<meta http-equiv="Content-Security-Policy"
content="frame-src https://acme.meetone.io;">
HTTPS requirement
Always use HTTPS for both your page and the iframe. This protects patient data in transit and is required for compliance with medical data regulations.
Cross-origin submission (no third-party cookies required)
The booking form is designed to submit from a cross-origin iframe, so it does not depend on any cookie reaching MeetOne. Because the request is cross-site, browsers do not send MeetOne's SameSite=Lax session cookie — and strict third-party-cookie blocking (for example, in Safari) would drop it entirely. The submit endpoint therefore does not rely on the session for CSRF protection or for the session-based parts of its bot protection.
You do not need to allow third-party cookies for your MeetOne tenant domain on your site for the booking form to work. Its spam protection does not depend on cookies either.
Troubleshooting
Iframe not loading
Symptoms: Blank iframe or an error message.
Possible causes:
- Invalid booking token
- Appointment requests not enabled for your account
- CSP blocking the iframe
- Mixed content (an HTTPS page loading an HTTP iframe URL)
Solutions:
- Copy the URL again from Integrations › Appointment requests rather than typing the token.
- Confirm appointment requests are enabled for your account — contact MeetOne support if you're not sure.
- Review the browser console for CSP or mixed-content errors.
- Ensure both your page and the iframe use HTTPS.
Events not firing
Symptoms: The iframe doesn't resize dynamically.
Possible causes:
- Event listener attached after the iframe loaded
- The listener checks the wrong origin —
event.originmust match the host in the iframe'ssrcexactly, includinghttps:// - The listener waits for custom DOM events (
window.addEventListener("meetone.iframe-resize", …)) — the form dispatches those only inside the iframe's own window, so they never reach your page; listen formessageinstead
Solutions:
- Attach event listeners before the iframe loads.
- Log every
messageevent on your page to confirm what arrives, then check your origin andcontextfilters.
MeetOne's navigation shows inside the iframe
Symptoms: The iframe shows MeetOne's header, navigation and footer around the form.
Solution: Add ?iframe=true to the URL — without it the form is shown in its full-page layout.
Incorrect height
Symptoms: The iframe shows scrollbars or cuts off content.
Solutions:
- Implement both the
meetone.iframe-readyandmeetone.iframe-resizelisteners. - Set
border: noneand remove fixed height constraints, such asmin-height, from your CSS. - Use the exact height from the message's
heightfield (event.data.height).
Related
Questions? Contact us at support@meetone.io.