{"record":{"id":"9071b9a1d4176704","repo":"calcom/cal.diy","slug":"failed-to-create-cal-video-meeting-please-ensure","errorCode":null,"errorMessage":"Failed to create Cal Video meeting. Please ensure DAILY_API_KEY is set and the daily-video app is enabled.","messagePattern":"Failed to create Cal Video meeting\\. Please ensure DAILY_API_KEY is set and the daily-video app is enabled\\.","errorType":"http","errorClass":"BadRequestException","httpStatus":400,"severity":"error","filePath":"apps/api/v2/src/platform/bookings/2024-08-13/services/booking-location-integration.service.ts","lineNumber":158,"sourceCode":"\n  private async handleCalVideoLocation(ctx: IntegrationHandlerContext): Promise<BookingLocationResponse> {\n    const credential = { ...FAKE_DAILY_CREDENTIAL };\n\n    await this.bookingVideoService.deleteOldVideoMeetingIfNeeded(ctx.existingBooking.id);\n\n    const evt = await this.calendarSyncService.buildCalEventFromBookingData(\n      ctx.booking,\n      ctx.internalLocation,\n      credential.id\n    );\n    const meetingResult = await createMeeting(credential, evt);\n\n    if (!meetingResult.createdEvent) {\n      this.logger.error(\n        `Failed to create Cal Video meeting`,\n        JSON.stringify({ success: meetingResult.success, type: meetingResult.type })\n      );\n      throw new BadRequestException(\n        `Failed to create Cal Video meeting. Please ensure DAILY_API_KEY is set and the daily-video app is enabled.`\n      );\n    }\n\n    const createdEvent = meetingResult.createdEvent;\n    const videoCallUrl = createdEvent.url;\n    const bookingLocation = videoCallUrl || ctx.internalLocation;\n\n    // FAKE_DAILY_CREDENTIAL has id: 0, so we don't include credentialId\n    const newReference = {\n      type: credential.type,\n      uid: createdEvent.id?.toString() || \"\",\n      meetingId: createdEvent.id?.toString(),\n      meetingPassword: createdEvent.password,\n      meetingUrl: createdEvent.url,\n    };\n\n    await BookingReferenceRepository.replaceBookingReferences({","sourceCodeStart":140,"sourceCodeEnd":176,"githubUrl":"https://github.com/calcom/cal.diy/blob/176037d0afbe572f870a3c702985e7cd83fe6c0c/apps/api/v2/src/platform/bookings/2024-08-13/services/booking-location-integration.service.ts#L140-L176","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before: DAILY_API_KEY unset, PATCH location to cal-video -> BadRequestException\n// after (.env)\nDAILY_API_KEY=your-valid-daily-api-key\n# plus: enable the daily-video app in the app store, then restart the API","handlingStrategy":"validation","validationCode":"// Validate Daily configuration before allowing cal-video location updates.\nconst dailyKeyOk = !!process.env.DAILY_API_KEY;\n// Optionally call Daily /rooms (or a health endpoint) to confirm the key is live.\nif (!dailyKeyOk) throw new Error('DAILY_API_KEY is not set; cal-video unavailable');","typeGuard":null,"tryCatchPattern":"try {\n  await api.patch(`/v2/bookings/${uid}/location`, { location: { type: 'integration', integration: 'cal-video' } });\n} catch (err) {\n  if (err.status === 400 && /DAILY_API_KEY/.test(err.message)) {\n    // surface a config error to ops; fall back to a connected integration if available\n  }\n  throw err;\n}","preventionTips":["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."],"tags":["cal-video","daily","env","integration","video"],"backgroundTag":null,"analyzedSha":"176037d0afbe572f870a3c702985e7cd83fe6c0c","analyzedAt":"2026-08-12T19:12:41.464Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}