The Google Calendar connector lets you interact with Google Calendar. It uses OAuth for authentication, so you connect your Google account once and Major handles token management. For full API details, see the Google Calendar API documentation.Documentation Index
Fetch the complete documentation index at: https://docs.major.build/llms.txt
Use this file to discover all available pages before exploring further.
Setup
- Go to Organization Settings > Connectors
- Click Add Connector and select Google Calendar
- Choose the access scope:
- Read only — Can list and read calendar events
- Read and write — Can list, read, and create calendar events
- Choose the authentication mode:
- Shared — Use a single shared account (the person configuring the resource provides credentials)
- Per-user — Each app user connects their own account
- Click Connect to Google to authorize access
- Select the calendar you want to connect (or skip if using per-user auth — users will select their own)
major resource manage (CLI) or the web editor. Major generates a client in src/clients/.
Per-User Authentication
When you configure a Google Calendar resource for per-user authentication, end-users authenticate with their own Google accounts instead of using shared credentials.User Flow
- User accesses a deployed app that uses a per-user Google Calendar resource
- If they haven’t connected their account, Major redirects them to the
/connectpage - User clicks Connect Google Calendar and authorizes access to their own calendar
- User is returned to the app and can now use Google Calendar features
Managing Connections
Users can view and manage their connected OAuth accounts by clicking their profile photo in the bottom left and selecting Connected Accounts. From there, they can disconnect individual OAuth credentials or reconnect if access expires. Once disconnected, users must re-authorize via the/connect page if they want to use apps that require that connection.
Usage
Import the generated client and use the helper methods:Listing calendars
operationName— A name for logging and debugging
items— Array of calendar objects withid,summary,description, and other metadata
Listing events
operationName— A name for logging and debuggingoptions— Query options:calendarId— Calendar identifier (default:primary)maxResults— Maximum events to return (1–250)orderBy— Sort order:startTimeorupdatedsingleEvents— Expand recurring events into instances (default:false)timeMin— Lower bound (RFC 3339 format)timeMax— Upper bound (RFC 3339 format)q— Search query term
items— Array of event objects withid,summary,start,end, and other metadata
Creating events
operationName— A name for logging and debuggingeventBody— Event object with:summary— Event title (required)description— Event descriptionstart— Start time withdateTimeand optionaltimeZoneend— End time withdateTimeand optionaltimeZoneattendees— Array of attendee objects withemaillocation— Event locationrecurrence— Recurrence rules (RFC 5545 format)
id— The created event’s IDhtmlLink— Link to the event in Google Calendar- Full event object with all details
Low-level API
For operations not covered by helper methods, useinvoke() directly:
Supported API paths
| Method | Path | Description |
|---|---|---|
| GET | /users/me/calendarList | List calendars |
| GET | /calendars/{calendarId}/events | List events |
| POST | /calendars/{calendarId}/events | Create event |
| GET | /calendars/{calendarId}/events/{eventId} | Get event details |
| PUT | /calendars/{calendarId}/events/{eventId} | Update event |
| DELETE | /calendars/{calendarId}/events/{eventId} | Delete event |
The calendar ID is configured in the resource and does not need to be included in all API paths, though you can specify a different calendar by passing
calendarId in options or the URL.Error handling
Common errors
| Error | Cause |
|---|---|
| 401 Unauthorized | OAuth not completed—reconnect the resource |
| 403 Forbidden | Write operation on a read-only resource |
| 404 Not Found | Calendar or event not found |
| 400 Bad Request | Invalid event data or query parameters |
Scope and permissions
When creating the resource, you choose between:- Read only —
GETrequests only - Read and write — Full read/write access including event creation and deletion