Search...
connectByCredentials( )
Developer Preview
Connects to an external calendar by directly providing the external calendar account credentials.
Description
Once a connection is successfully created, use listEvents()
to obtain an up-to-date list of events in the connected external calendars.
Note: Use
listProviders()
to find out whether to connect to a particular provider using this method orconnectByOAuth()
.
Admin Method
This function requires elevated permissions to run. This function is not universal and runs only on the backend.
Syntax
function connectByCredentials(providerId: string, scheduleId: string, email: string, password: string): Promise<ConnectByCredentialsResponse>
connectByCredentials Parameters
NAME
TYPE
DESCRIPTION
scheduleId
string
ID of the schedule to connect with the external calendar account.
email
string
Email address for the external calendar account.
password
string
Password for the external calendar account.
Returns
Return Type:
Promise<
ConnectByCredentialsResponse
>NAME
TYPE
DESCRIPTION
connection
Connection
Established connection details.
Was this helpful?
Connect with an external calendar by credentials
Copy Code
1import {externalCalendars} from 'wix-bookings.v2';23async function connectByCredentials(providerId, scheduleId, email, password) {4 const {connection} =5 await externalCalendars.connectByCredentials(providerId, scheduleId, email, password)6 return connection7}