calcom/cal.diy · error · BadRequestException
Failed to create Cal Video meeting. Please ensure DAILY_API_
Error message
Failed to create Cal Video meeting. Please ensure DAILY_API_KEY is set and the daily-video app is enabled.
What it means
Thrown by handleCalVideoLocation when createMeeting(credential, evt) returns no createdEvent while using the FAKE_DAILY_CREDENTIAL. Cal Video is powered by Daily.co (internal location "integrations:daily"); a falsy createdEvent means the Daily API rejected or failed the meeting creation. The message names the two usual culprits: DAILY_API_KEY missing/invalid, or the daily-video app disabled.
Source
Thrown at apps/api/v2/src/platform/bookings/2024-08-13/services/booking-location-integration.service.ts:158
private async handleCalVideoLocation(ctx: IntegrationHandlerContext): Promise<BookingLocationResponse> {
const credential = { ...FAKE_DAILY_CREDENTIAL };
await this.bookingVideoService.deleteOldVideoMeetingIfNeeded(ctx.existingBooking.id);
const evt = await this.calendarSyncService.buildCalEventFromBookingData(
ctx.booking,
ctx.internalLocation,
credential.id
);
const meetingResult = await createMeeting(credential, evt);
if (!meetingResult.createdEvent) {
this.logger.error(
`Failed to create Cal Video meeting`,
JSON.stringify({ success: meetingResult.success, type: meetingResult.type })
);
throw new BadRequestException(
`Failed to create Cal Video meeting. Please ensure DAILY_API_KEY is set and the daily-video app is enabled.`
);
}
const createdEvent = meetingResult.createdEvent;
const videoCallUrl = createdEvent.url;
const bookingLocation = videoCallUrl || ctx.internalLocation;
// FAKE_DAILY_CREDENTIAL has id: 0, so we don't include credentialId
const newReference = {
type: credential.type,
uid: createdEvent.id?.toString() || "",
meetingId: createdEvent.id?.toString(),
meetingPassword: createdEvent.password,
meetingUrl: createdEvent.url,
};
await BookingReferenceRepository.replaceBookingReferences({View on GitHub (pinned to 176037d0af)
Solutions
- Set a valid DAILY_API_KEY in the server environment and restart the API process.
- Ensure the daily-video app is enabled in the Cal.com app store / deployment config.
- Check the Daily.co dashboard for key validity, quota, and service status.
- If Daily is unavailable, switch the location to an already-connected third-party integration (Zoom, etc.) instead of cal-video.
Example fix
// before: DAILY_API_KEY unset, PATCH location to cal-video -> BadRequestException // after (.env) DAILY_API_KEY=your-valid-daily-api-key # plus: enable the daily-video app in the app store, then restart the API
Defensive patterns
Strategy: validation
Validate before calling
// Validate Daily configuration before allowing cal-video location updates.
const dailyKeyOk = !!process.env.DAILY_API_KEY;
// Optionally call Daily /rooms (or a health endpoint) to confirm the key is live.
if (!dailyKeyOk) throw new Error('DAILY_API_KEY is not set; cal-video unavailable'); Try / catch
try {
await api.patch(`/v2/bookings/${uid}/location`, { location: { type: 'integration', integration: 'cal-video' } });
} catch (err) {
if (err.status === 400 && /DAILY_API_KEY/.test(err.message)) {
// surface a config error to ops; fall back to a connected integration if available
}
throw err;
} Prevention
- Set DAILY_API_KEY in every environment that supports cal-video and alert on its absence.
- Keep the daily-video app enabled in the app store.
- Monitor Daily.co quota and key validity; rotate keys and update env promptly.
When it happens
Trigger: PATCH booking location to integration "cal-video", or to "google-meet" when the booking has no Google Calendar reference (the code falls back to Cal Video). createMeeting invokes the Daily adapter, which needs DAILY_API_KEY; if it is unset/invalid or the daily-video app is disabled, createdEvent is empty.
Common situations: Self-hosted Cal.com deployed without DAILY_API_KEY in the environment; Daily API key revoked or rotated without updating env; daily-video app toggled off in the app store; Daily.co quota exceeded or transient Daily outage; the google-meet fallback path surprising developers who expected a Meet link.
Related errors
- Video integration "${ctx.integrationSlug}" is not connected.
- Failed to create video meeting with ${ctx.integrationSlug}.
- No ${requiredCalendarType.replace("_", " ")} event found for
- Booking of id ${bookingId} does not exist or does not contai
- Booking reference not found
AI-assisted analysis of calcom/cal.diy@176037d0af (2026-08-12).
Data as JSON: /api/errors/9071b9a1d4176704.
Report an issue: GitHub.