Prompt
How do I build booking links that check free/busy first?
Latest observation
Oct 15, 2026
OpenAI APIWeb search: off
To build booking links that check free/busy first, the basic flow is:
- User clicks booking link
- Your app checks the relevant calendar(s) for availability
- If the slot is free, you show/allow booking
- If it’s busy, you block it or offer alternatives
Typical approaches
1) Simple “availability-check” link
Use a link like:
https://yourapp.com/book?start=2026-10-15T14:00:00Z&end=2026-10-15T14:30:00Z
When opened:
- your backend reads
startandend - queries calendar free/busy
- if free, continue to booking form or confirmation
- if busy, redirect to an alternative times page
2) One-click booking with token
If you don’t want users to tamper with the time, generate a signed token:
https://yourapp.com/book?t=SIGNED_TOKEN
Token can contain:
- proposed start/end
- organizer/resource ID
- expiry time
- location/meeting type
Your server verifies the token, then checks free/busy before confirming.
3) “Reserve then confirm” flow
If double-booking is a concern:
- check free/busy
- tentatively hold the slot
- finalize after user completes the form/payment
- release hold if they abandon
What to check
Usually you want to query:
- the host’s calendar
- shared/resource calendars
- any team calendars that should block the slot
Then decide:
- All calendars free → book
- Any calendar busy → reject or suggest alternatives
Example backend logic
def booking_link_handler(start, end, calendar_ids):
busy = get_busy_times(calendar_ids, start, end)
if busy:
return {"available": False, "alternatives": find_alternatives()}
return {"available": True, "next": "/confirm"}
Best practices
- Use server-side free/busy checks, not only client-side
- Sign or expire booking links to prevent abuse
- Re-check availability right before final confirmation
- Handle time zones carefully
- If using Google/Microsoft calendars, use their free/busy APIs rather than fetching full event details
If you’re using a calendar provider
- Google Calendar: use the FreeBusy API
- Microsoft Graph: use
getSchedule/ availability endpoints - CalDAV: query free/busy where supported
If you want, I can show:
- a Google Calendar example
- a Microsoft Graph example
- or a full booking-link design with signed URLs and availability checks.