Patient verification
How Medos widgets verify a patient with a one-time code by phone or email, which widgets verify, and how otpChannels narrows the choice.
Before a widget shows or changes anything about a patient, it confirms they control the contact they typed, with a one-time code.
| Widget | Verifies | Channels |
|---|---|---|
| Booking | Yes | Phone and email, set with otpChannels |
| Patient portal | Yes, to sign in | Phone and email, set with otpChannels |
| Package purchase | Yes | Phone only — otpChannels isn't accepted |
| Enquiry form | No | — contact details are taken at face value |
otpChannels
| Option | Type | Default | Description |
|---|---|---|---|
otpChannels | ("phone" | "email")[] | ["phone", "email"] | Which channels the verification step offers the patient. |
Both channels are offered by default, so a patient can verify on whichever one they can actually receive a code on. Narrow it when your workspace only supports one:
// A workspace with no email sending domain configured
MedosBooking.init({
apiKey: "mk_your_publishable_key",
otpChannels: ["phone"],
});The order you list them in doesn't matter — the toggle always reads the same way, with phone first when both are offered.
A bad value falls back to phone only, not to both
If otpChannels isn't an array, or contains nothing usable, the widget uses
["phone"] alone. A garbled value isn't evidence that email delivery works for
your workspace, and offering a channel that silently never delivers is worse
than offering one fewer.
The portal follows the same rules — pass otpChannels to
MedosPatientPortal.init().
Sizing
Cap a Medos widget's width and height with maxWidth and maxHeight, which widgets accept them, and how each one sizes itself by default.
Languages and right-to-left
The eight languages the Medos widgets support, how each widget picks one, which widgets let the patient switch, and right-to-left layout.