This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Disconnects from an external calendar.
When an external calendar is disconnected, the external calendar connection's status
is changed to DISCONNECTED
.
After disconnecting, listEvents()
no longer returns events from the disconnected external calendar.
Exported Wix calendar sessions are deleted from the external calendar.
This function requires elevated permissions and runs only on the backend and on dashboard pages.
function disconnect(connectionId: string): Promise<DisconnectResponse>;
ID of the external calendar connection to disconnect.
import { externalCalendars } from "wix-bookings.v2";
async function disconnect(connectionId) {
const { connection: updatedConnection } =
await externalCalendars.disconnect(connectionId);
return updatedConnection;
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.