Overview
This page documents all TypeScript types, interfaces, and enums used when working with calendar integrations in the Recall AI SDK.Core Types
CalendarPlatform
- google_calendar: Google Calendar integration
- microsoft_outlook: Microsoft Outlook Calendar integration
CalendarStatus
- connecting: Calendar is in the process of establishing connection
- connected: Calendar is successfully connected and syncing
- disconnected: Calendar connection is inactive or has been terminated
Request Parameters
CreateCalendarParams
- oauth_client_id (required): OAuth 2.0 client ID from the calendar platform
- oauth_client_secret (required): OAuth 2.0 client secret from the calendar platform
- oauth_refresh_token (required): OAuth 2.0 refresh token for maintaining access
- platform (required): Calendar platform type (Google Calendar or Microsoft Outlook)
- oauth_email: Email address associated with the calendar account
UpdateCalendarParams
- id (required): Calendar integration identifier (inherited from BaseCalendarParams)
- oauth_client_id: Updated OAuth client ID
- oauth_client_secret: Updated OAuth client secret
- oauth_refresh_token: Updated OAuth refresh token
- platform: Updated calendar platform
- oauth_email: Updated email address
BaseCalendarParams
- id: Unique identifier for the calendar integration
ListCalendarParams
- created_at__gte: Filter calendars created on or after this date (greater than or equal)
- cursor: Pagination cursor for fetching the next page of results
- email: Filter calendars by associated email address
- platform: Filter by calendar platform (Google Calendar or Microsoft Outlook)
- status: Filter by connection status
Response Types
CreateCalendarResponse
- platform: The calendar platform that was connected
- oauth_email: Email address associated with the calendar
- oauth_client_id: Client ID used (may be masked for security)
- oauth_client_secret: Client secret used (may be masked for security)
- oauth_refresh_token: Refresh token (may be masked for security)
Internal Types
OauthParams
- oauth_client_id: OAuth client identifier
- oauth_client_secret: OAuth client secret key
- oauth_refresh_token: Token for refreshing access credentials
Example Usage
Creating a Google Calendar Integration
Creating a Microsoft Outlook Integration
Listing Calendar Integrations
Updating a Calendar Integration
Filtering by Status
Filtering by Email and Platform
OAuth Setup
Google Calendar
To obtain OAuth credentials for Google Calendar:- Go to Google Cloud Console
- Create a new project or select an existing one
- Enable the Google Calendar API
- Create OAuth 2.0 credentials (Web application)
- Configure authorized redirect URIs
- Obtain the client ID and client secret
- Use the OAuth flow to get a refresh token
Microsoft Outlook
To obtain OAuth credentials for Microsoft Outlook:- Go to Azure Portal
- Register a new application in Azure AD
- Add Microsoft Graph API permissions for Calendar
- Create a client secret
- Configure redirect URIs
- Use the OAuth 2.0 authorization code flow to get a refresh token
Security Considerations
- Never expose OAuth credentials in client-side code or public repositories
- Store client secrets and refresh tokens securely (e.g., environment variables, secrets manager)
- Implement proper error handling for expired or invalid tokens
- Use HTTPS for all OAuth redirect URIs
- Regularly rotate OAuth credentials per your security policy
- Monitor calendar connection status and alert on disconnections
Pagination
When listing calendars, use thecursor parameter for pagination: