Get Calendar Settings
Retrieves all user settings from Google Calendar. This action provides access to the user’s calendar configuration and preferences.
Overview
- Purpose: Fetch all calendar settings and preferences for the authenticated user.
- Use Cases: Reading user preferences, understanding calendar configuration, syncing settings, building calendar management tools.
- API Method: GET /settings
- Google API: Uses Google Calendar API v3
/calendar/v3/users/me/settingsendpoint. - Required Scope:
https://www.googleapis.com/auth/calendar.settings.readonly
Input Fields
No Input Required: This action does not require any input parameters. It retrieves all settings for the currently authenticated user.
Output
Returns an object containing an array of setting objects. Each setting includes:
- Kind: Resource type identifier (typically ‘calendar#setting’).
- ETag: Entity tag for the setting, used for caching and conflict detection.
- ID: Unique identifier for the setting (e.g., ‘timezone’, ‘dateFieldOrder’, ‘timeFormat’).
- Value: The current value of the setting.
Common Settings
- timezone: User’s preferred timezone (e.g., ‘America/New_York’, ‘Europe/London’).
- dateFieldOrder: Date format preference (e.g., ‘MDY’, ‘DMY’, ‘YMD’).
- timeFormat: Time display format (12-hour or 24-hour).
- weekStart: First day of the week (0 for Sunday, 1 for Monday, etc.).
- showDeclinedEvents: Whether to show declined events in calendar views.
- locale: User’s locale setting (e.g., ‘en’, ‘es’, ‘fr’).
- hideInvitations: Whether to hide event invitations.
- hideWeekends: Whether to hide weekends in calendar views.
Pagination
- Automatic Pagination: The action automatically handles pagination to retrieve all settings.
- Page Token: Uses nextPageToken from responses to fetch subsequent pages.
- Complete Results: Returns all settings in a single response array.
Required Permissions
[!IMPORTANT] OAuth Scope: Requires
https://www.googleapis.com/auth/calendar.settings.readonlyscope.
- Read-Only: This action only reads settings, it cannot modify them.
- User Consent: Users must grant permission to read their calendar settings during OAuth flow.
Error Handling
- Invalid Response: Throws an error if the API response format is invalid or missing items.
- Retry Logic: Automatically retries failed requests up to 3 times.
- Scope Error: Will fail if the required scope is not granted during OAuth.
Tips
[!TIP] Use the timezone setting to properly display event times in the user’s local timezone
[!TIP] Check dateFieldOrder and timeFormat to format dates/times according to user preferences
[!TIP] Store settings locally to avoid repeated API calls for frequently accessed values
[!TIP] The weekStart setting is useful for rendering calendar week views correctly
[!TIP] Settings are user-specific - different users will have different preferences
[!TIP] Use ETags for efficient caching - only refetch if ETag has changed
[!IMPORTANT] Ensure your OAuth flow requests the calendar.settings.readonly scope
[!TIP] Settings IDs are consistent across users but values vary by user preference
[!TIP] Locale setting helps with internationalization and localization
[!TIP] Some settings may not be present for all users - handle missing settings gracefully