Subchapter 8.19
references/bookings/external-calendar-integration.mdMarkdown13 KBView on GitHub
Below are the recommended steps to successfully connect and sync external calendars (Google Calendar, Microsoft Outlook, Apple Calendar) with Wix Bookings, with real-world troubleshooting and fixes for common API issues. This recipe covers the complete OAuth flow, sync configuration, and verification procedures.
Before connecting external calendars, ensure the following requirements are met:
CRITICAL: External calendar integration is a premium feature. If not enabled, you’ll receive a 403 error with "PREMIUM_FEATURE_NOT_ENABLED" code.
Verification Steps:
If you encounter app-related errors, install the required apps using the Apps Installer API.
For detailed app installation procedures, refer to:
Wix External Calendar integration allows bidirectional sync between Wix schedules and external calendar providers. The system supports:
❌ COMMON ENDPOINT MISTAKES:
/bookings/v2/external-calendar/providers (missing ‘s’ in calendars)/calendar/v3/external-calendars/ (wrong namespace)✅ CORRECT ENDPOINTS:
/bookings/v2/external-calendars/providers/bookings/v2/external-calendars/connections:connectByOAuth/bookings/v2/external-calendars/connectionsSchedule Types Available:
4e0579a5-491e-4e70-a872-d097eed6e520Recommendation:
syncConfig after connectionFirst, confirm external calendar features are available and identify supported providers.
Use listProviders API (REST (opens in a new tab)):
Expected Response Structure:
name: "Google", features.connectMethods: ["OAUTH"]name: "Outlook or Office 365", features.connectMethods: ["OAUTH"]name: "Apple", features.connectMethods: ["CREDENTIALS"]Save the providerId for your desired provider and note the required connectMethods.
Identify which schedule to connect the external calendar to using querySchedules API (REST (opens in a new tab)):
Schedule Selection Guide:
Save the scheduleId for your chosen schedule.
For OAuth providers (Google, Microsoft), create a connection using connectByOAuth API (REST (opens in a new tab)):
Required Parameters:
providerId: From step 1scheduleId: From step 2redirectUrl: Where user returns after authorization (can be placeholder)Response Contains:
oauthUrl: URL to redirect user for authorizationUser Authorization Flow:
oauthUrlredirectUrl with connectionId parameterconnectionId from redirect URL query parametersFor credential-based providers (Apple), use connectByCredentials API (REST (opens in a new tab)):
Required Parameters:
providerId: Apple provider IDscheduleId: Target schedule IDemail: Apple ID emailpassword: Apple ID passwordImportant: This method requires collecting sensitive credentials from users.
After successful connection, verify the connection status and configure sync settings:
Check Connection:
Use getConnection API (REST (opens in a new tab)) with the connectionId.
Review Sync Configuration:
"CONNECTED" when successfulsyncConfig.listEventFromCalendars.enabled controls importing external events to WixsyncConfig.syncToCalendar.enabled controls exporting Wix events to external calendarUpdate Sync Settings (if needed):
Use updateSyncConfig API (REST (opens in a new tab)) to modify import/export behavior.
Verify the integration is working by listing external calendar events:
Use listEvents API (REST (opens in a new tab)) with date range filters:
Required Parameters:
from: Start date (required)to: End date (required)scheduleIds: Optional filter by specific schedulesThis should return events from the connected external calendar.
connectByOAuth calls“PREMIUM_FEATURE_NOT_ENABLED” Error (403):
“Not Found” Error (404) on Providers:
/external-calendars/providersOAuth Authorization Fails:
redirectUrl is accessible and properly formattedOAuth Internal Server Errors:
redirectUrl parameter (e.g., https://www.wix.com instead of custom URLs)OAuth Flow Recovery Steps:
Connection Shows “DISCONNECTED” Status:
Events Not Syncing:
syncConfig settings match intended behaviorlistEvents callsMultiple Calendar Connections Conflict:
Apple Calendar Credential Issues:
Google Calendar:
https://www.googleapis.com/auth/calendarMicrosoft Outlook/365:
Apple Calendar: