{"record":{"id":"f37eaa7e57460c43","repo":"calcom/cal.diy","slug":"booking-location-with-integration-inputbookinglo","errorCode":null,"errorMessage":"Booking location with integration ${inputBookingLocation.integration} not valid for event type with id=${dbEventType.id}. The event type has following integrations: ${allowedIntegrations.join(\", \")}, and only these integrations are allowed for booking location.","messagePattern":"Booking location with integration (.+?) not valid for event type with id=(.+?)\\. The event type has following integrations: (.+?), and only these integrations are allowed for booking location\\.","errorType":"http","errorClass":"BadRequestException","httpStatus":400,"severity":"error","filePath":"apps/api/v2/src/platform/bookings/2024-08-13/services/input.service.ts","lineNumber":407,"sourceCode":"    const isAllowed = allowedLocationTypes.includes(inputBookingLocation.type);\n    if (!isAllowed) {\n      throw new BadRequestException(\n        `Booking location with type ${inputBookingLocation.type} not valid for event type with id=${\n          dbEventType.id\n        }. The event type has following location types: ${allowedLocationTypes.join(\n          \", \"\n        )}, and only these types are allowed for booking location.`\n      );\n    }\n\n    if (inputBookingLocation.type === \"integration\" && \"integration\" in inputBookingLocation) {\n      const allowedIntegrations = eventTypeLocations\n        .filter((location) => location.type === \"integration\")\n        .map((location) => location.integration);\n\n      const isAllowedIntegration = allowedIntegrations.includes(inputBookingLocation.integration);\n      if (!isAllowedIntegration) {\n        throw new BadRequestException(\n          `Booking location with integration ${\n            inputBookingLocation.integration\n          } not valid for event type with id=${\n            dbEventType.id\n          }. The event type has following integrations: ${allowedIntegrations.join(\n            \", \"\n          )}, and only these integrations are allowed for booking location.`\n        );\n      }\n    }\n\n    return true;\n  }\n\n  async transformInputCreateRecurringBooking(\n    inputBooking: CreateRecurringBookingInput_2024_08_13,\n    eventType: EventTypeWithOwnerAndTeam,\n    platformClientId?: string","sourceCodeStart":389,"sourceCodeEnd":425,"githubUrl":"https://github.com/calcom/cal.diy/blob/176037d0afbe572f870a3c702985e7cd83fe6c0c/apps/api/v2/src/platform/bookings/2024-08-13/services/input.service.ts#L389-L425","documentation":"Thrown by isBookingLocationWithEventTypeLocations when the booking location type is 'integration' but the specific integration slug is not among the event type's configured integrations. BadRequestException (HTTP 400). Even if the type is allowed, the exact integration (e.g. 'zoom' vs 'google-meet') must match one the organizer enabled.","triggerScenarios":"POST /v2/bookings with { type:'integration', integration:'zoom' } where the event type only has google-meet (or cal-video) configured. The validator filters the event type's locations for type === 'integration', maps to their integration slugs, and rejects if the requested slug is not in that list.","commonSituations":"Defaulting to a hard-coded integration regardless of what the organizer set; organizer swapped default conferencing app after the client cached the event type; multi-integration event type where the client picks the wrong one; using an internal integration label instead of the API slug.","solutions":["Fetch the event type and pick an integration from its configured integration locations.","Send only an integration slug that appears in the event type's locations list.","If the organizer needs the requested integration, add it to the event type's locations in the dashboard.","Fall back to organizersDefaultApp if you want the organizer's configured default rather than a specific integration."],"exampleFix":"// before\nlocation: { type:'integration', integration:'zoom' }  // event type has only google-meet\n\n// after\nconst et = await api.get(`/v2/event-types/${eventTypeId}`);\nconst allowedIntegration = et.data.locations.find(l => l.type === 'integration')?.integration;\nlocation = { type:'integration', integration: allowedIntegration };","handlingStrategy":"validation","validationCode":"const et = await api.get(`/v2/event-types/${eventTypeId}`);\nconst allowedIntegrations = et.data.locations.filter(l => l.type === 'integration').map(l => l.integration);\nif (body.location?.type === 'integration' && !allowedIntegrations.includes(body.location.integration)) {\n  body.location.integration = allowedIntegrations[0];\n}","typeGuard":"const isAllowedIntegration = (slug: string, allowed: string[]): boolean => allowed.includes(slug);","tryCatchPattern":"try { await api.post('/v2/bookings', body); }\ncatch (e) {\n  if (e.response?.status === 400 && /integration.*not valid for event type/.test(e.response.data.message)) {\n    /* pick an integration listed in the error and retry */\n  } else throw e;\n}","preventionTips":["Pick the integration from the event type's configured integration locations.","Use organizersDefaultApp to defer to the organizer's default.","Re-fetch the event type after the organizer changes conferencing apps."],"tags":["api","bookings","location","integration","event-types","validation","nestjs"],"backgroundTag":null,"analyzedSha":"176037d0afbe572f870a3c702985e7cd83fe6c0c","analyzedAt":"2026-08-12T19:12:41.464Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}