This article shares possible use cases your implementation could support, as well as a sample flow for each one. You're not limited to these use cases, but they can be a helpful jumping off point for your planning.
External calendar providers utilize different methods for authenticating connections. Some use an OAuth flow, while others require user credentials (email address and password).
To determine the appropriate connection method for a provider:
id
and features.connectMethods
.features.connectMethods
array contains
OAUTH
, you can follow the connect by OAuth flow
(SDK | REST).
If it includes CREDENTIALS
, you can follow the
connect by credentials flow
(SDK | REST).Before you can sync events between an external calendar account and a Wix site, you need to establish a connection. If the external provider supports connecting by credentials, create the connection as follows:
schedule
to connect the external calendar with. Save its
id
.scheduleId
, providerId
, email
, and password
.connection
object with {"status": "CONNECTED"}
.connection.syncConfig.listEventFromCalendars.enabled
is set to true
, events are imported to Wix.connection.syncConfig.syncToCalendar.enabled
is set to true
, events
are exported to the external calendar.connectionId
and the relevant syncConfig
object.Before you can sync events between an external calendar account and a Wix site, you need to establish a connection. If the external provider supports connecting by OAuth, create the connection as follows:
schedule
to connect the external calendar with. Save its
id
.redirectUrl
to which the account owner is redirected after
authorizing access to their external calendar. Save the returned oAuthUrl
.oAuthUrl
.redirectUrl
from step 3. Save the connectionId
query parameter that has been automatically added to the redirect URL.connection.syncConfig.listEventFromCalendars.enabled
is set to true
, events are imported to Wix.connection.syncConfig.syncToCalendar.enabled
is set to true
, events
are exported to the external calendar.connectionId
and the relevant syncConfig
object.After you've connected an external calendar account with a Wix site, you can use the External Calendar API to retrieve information the events from the relevant external calendar accounts for a time range of your choice.
To retrieve external calendar events: