calcom/cal.diy · error · BadRequestException

Booking location with integration ${inputBookingLocation.int

Error message

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.

What it means

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.

Source

Thrown at apps/api/v2/src/platform/bookings/2024-08-13/services/input.service.ts:407

    const isAllowed = allowedLocationTypes.includes(inputBookingLocation.type);
    if (!isAllowed) {
      throw new BadRequestException(
        `Booking location with type ${inputBookingLocation.type} not valid for event type with id=${
          dbEventType.id
        }. The event type has following location types: ${allowedLocationTypes.join(
          ", "
        )}, and only these types are allowed for booking location.`
      );
    }

    if (inputBookingLocation.type === "integration" && "integration" in inputBookingLocation) {
      const allowedIntegrations = eventTypeLocations
        .filter((location) => location.type === "integration")
        .map((location) => location.integration);

      const isAllowedIntegration = allowedIntegrations.includes(inputBookingLocation.integration);
      if (!isAllowedIntegration) {
        throw new BadRequestException(
          `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.`
        );
      }
    }

    return true;
  }

  async transformInputCreateRecurringBooking(
    inputBooking: CreateRecurringBookingInput_2024_08_13,
    eventType: EventTypeWithOwnerAndTeam,
    platformClientId?: string

View on GitHub (pinned to 176037d0af)

Solutions

  1. Fetch the event type and pick an integration from its configured integration locations.
  2. Send only an integration slug that appears in the event type's locations list.
  3. If the organizer needs the requested integration, add it to the event type's locations in the dashboard.
  4. Fall back to organizersDefaultApp if you want the organizer's configured default rather than a specific integration.

Example fix

// before
location: { type:'integration', integration:'zoom' }  // event type has only google-meet

// after
const et = await api.get(`/v2/event-types/${eventTypeId}`);
const allowedIntegration = et.data.locations.find(l => l.type === 'integration')?.integration;
location = { type:'integration', integration: allowedIntegration };
Defensive patterns

Strategy: validation

Validate before calling

const et = await api.get(`/v2/event-types/${eventTypeId}`);
const allowedIntegrations = et.data.locations.filter(l => l.type === 'integration').map(l => l.integration);
if (body.location?.type === 'integration' && !allowedIntegrations.includes(body.location.integration)) {
  body.location.integration = allowedIntegrations[0];
}

Type guard

const isAllowedIntegration = (slug: string, allowed: string[]): boolean => allowed.includes(slug);

Try / catch

try { await api.post('/v2/bookings', body); }
catch (e) {
  if (e.response?.status === 400 && /integration.*not valid for event type/.test(e.response.data.message)) {
    /* pick an integration listed in the error and retry */
  } else throw e;
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of calcom/cal.diy@176037d0af (2026-08-12). Data as JSON: /api/errors/f37eaa7e57460c43. Report an issue: GitHub.