SDK Usage #
Authentication Setup #
Create OAuth credentials in Google Cloud Console to get a Client ID and Client Secret for authentication.
1. Create a Google Cloud Project
- Go to console.cloud.google.com
- Click the project selector dropdown at the top
- Click New Project
- Enter a project name and click Create
- Select your new project once created
2. Enable Google Calendar API
- Go to APIs & Services → Library
- Search for "Google Calendar API"
- Click on Google Calendar API
- Click Enable
3. Configure OAuth Consent Screen
- Go to APIs & Services → OAuth consent screen
- Select External user type (or Internal for Workspace)
- Fill in app information
4. Add Scopes
Add the following Google Calendar API scopes based on your needs:
// Full scope URLs: https://www.googleapis.com/auth/calendar.*
5. Create OAuth Credentials
- Go to APIs & Services → Credentials
- Click Create Credentials → OAuth client ID
- Select Web application as application type
- Enter a name for your OAuth client
https://hotglue.tech/api/auth/callback// Click Create to generate your credentials.
6. Get OAuth Credentials
Client ID
— copy from the credentials page
Client Secret
— copy from the credentials page
// Store these credentials securely — you'll need them for OAuth flow.
Scope Reference
Each scope enables specific actions:
calendar_full
— full access to all calendar operations
calendar_readonly
— view calendars, colors, settings
events
— create, update, delete events
events_readonly
— view events, query free/busy
Publishing Status
While in Testing status, only test users you explicitly add can use the OAuth flow. To allow any Google user, submit your app for verification and publish it. Apps using sensitive scopes require Google's review process.
Scopes #
When users connect their Google Calendar account, they'll be asked to grant some of these permissions, depending on which tools you configured for connection:
https://www.googleapis.com/auth/calendar
Full access to calendars and events
https://www.googleapis.com/auth/calendar.readonly
Read-only access to calendars
https://www.googleapis.com/auth/calendar.events
View and edit events on all calendars
https://www.googleapis.com/auth/calendar.events.readonly
View events on all calendars