This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Connects to an external calendar using the OAuth authorization protocol.
The authorization flow should take place as follows:
redirectUrl
body parameter, with a query parameter connectionId
containing the new connection ID.If the attempt to connect fails, the user is still redirected to the URL you provide in the redirectUrl
body parameter,
but with a query parameter error
containing one of the following values:
reject
: The user rejected the authorization request.unsupported
: Connecting to the user's external account type is not supported by the provider.internal
: An error unrelated to the client or the request that prevents the server from fulfilling the request.Once a connection is successfully created, use List Events to obtain an up-to-date list of events in the connected external calendars.
This endpoint validates that the specified schedule is owned by the Wix user connecting the calendar, or that the caller has the Manage External Calendars or Manage Business Calendar permission scope.
If the schedule's ownership changes, the connection to the external calendar is automatically disconnected.
Note: Use List Providers to find out whether to connect to a particular provider using this endpoint or Connect by Credentials.
You can only call this method when authenticated as a Wix app or Wix user identity.
ID of the schedule to connect with the external calendar account.
ID of the external calendar provider. Find this with the List Providers endpoint.
URL to redirect the user to after they authorize access to the external calendar account.
If the connection is successfully established, the user is redirected to this URL with a query parameter connectionId
containing the new connection ID.
If the attempt to connect fails, the user is redirected to this URL with a query parameter error
containing the error type.
URL of the external calendar authorization page to redirect the user to.
curl -X POST 'https://www.wixapis.com/bookings/v2/external-calendars/connections:connectByOAuth' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
--data-raw '{
"providerId": "6c533722-f1f9-4847-95c7-d4c4922ae9b0",
"scheduleId": "3e47ec65-2975-447c-a7ed-75041e850d5e",
"redirectUrl": "https://mysite.com/oauth_completed"
}'
{
"oauthUrl": "https://authorize-url-to-redirect-user-to.com/..."
}
There is 1 error with this status code.
This method may also return standard errors. Learn more about standard Wix errors.