Skip to main content

Overview

To schedule meetings on behalf of your users, they must first connect their Google Calendar. There are two ways to generate the OAuth URL.

Two Ways to Get the OAuth URL

Construct the URL directly using your publishable key (pk_live_xxx). This is simpler and doesn’t require an API call.

Option B: Call the API Endpoint

Call the /v1/platform/oauth-url endpoint with your secret key (sk_live_xxx) to get a pre-built URL.
Response:

Key Types

Never expose your secret key (sk_live_xxx) in URLs or client-side code. Always use your publishable key (pk_live_xxx) for OAuth URLs.

OAuth URL Parameters

platform_key
string
required
Your publishable key (pk_live_xxx)
user_email
string
required
The email address of the user who needs to connect their calendar
redirect_uri
string
Where to redirect after successful OAuth. Must be in your allowed redirect URIs.
state
string
Optional state parameter for CSRF protection. Will be returned to your redirect URI.

User Flow

Complete Example

Step 2: Handle OAuth Callback

Step 3: Verify Connection

Use Cases

New User Onboarding

Check Connection Status

Reconnection Flow

Security Considerations

CSRF Protection with State

Always use the state parameter to prevent CSRF attacks:

User Email Validation

Always validate the email belongs to your authenticated user:

Error Responses

Invalid Email Format

Platform Not Found

Check User Status

Verify if user has connected

List Connected Users

See all connected users

Platform Settings

Configure redirect URIs