Documentation Index
Fetch the complete documentation index at: https://docs.alterauth.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Connect your users to Google Workspace services including Gmail, Google Calendar, Google Drive, and Google Sheets.| Property | Value |
|---|---|
| Provider ID | google |
| PKCE | Supported |
| Token refresh | Automatic (refresh token reused) |
| Access token lifetime | ~1 hour |
| Redirect URI | Shown in Developer Portal |
Step 1: Create a Google Cloud Project
Go to Google Cloud Console
Navigate to console.cloud.google.com and sign in with your Google account.
Create or select a project
Click the project dropdown at the top and select New Project. Give it a name (e.g., “My App - Alter Integration”) and click Create.
Step 2: Create OAuth Credentials
Configure consent screen (first time only)
If prompted, configure the OAuth consent screen:
- User Type: External (unless you only need Google Workspace users)
- App name: Your application name
- User support email: Your email
- Authorized domains: Your domain
- Developer contact: Your email
Create OAuth client ID
- Application type: Web application
- Name: e.g., “Alter Vault Integration”
- Authorized redirect URIs: Copy the Redirect URI from the Developer Portal
- Click Create
Step 3: Add to Alter Vault
Open the Developer Portal
Go to portal.alterauth.com and navigate to your app.
Enter credentials
- Client ID: Paste your Google Client ID
- Client Secret: Paste your Google Client Secret
Select scopes
Choose the scopes your app needs. See the Available Scopes section below.
Step 4: Test It
After a user connects via Alter Connect, use the returnedgrant_id to make API calls:
Available Scopes
Identity (included by default)
| Scope | Description |
|---|---|
openid | Authenticate with OpenID Connect |
profile | View basic profile info |
email | View email address |
Gmail
| Scope | Description |
|---|---|
https://www.googleapis.com/auth/gmail.readonly | Read email messages and settings |
https://www.googleapis.com/auth/gmail.send | Send email on user’s behalf |
https://www.googleapis.com/auth/gmail.compose | Manage drafts and send emails |
https://www.googleapis.com/auth/gmail.modify | Read, compose, send, and delete email |
Google Calendar
| Scope | Description |
|---|---|
https://www.googleapis.com/auth/calendar.readonly | View calendars |
https://www.googleapis.com/auth/calendar.events | View and edit calendar events |
Google Drive
| Scope | Description |
|---|---|
https://www.googleapis.com/auth/drive.readonly | View Drive files |
https://www.googleapis.com/auth/drive.file | Manage files opened with this app |
https://www.googleapis.com/auth/drive | Full Drive access (read, edit, create, delete) |
Common API Endpoints
| Use Case | Method | URL |
|---|---|---|
| List calendar events | GET | https://www.googleapis.com/calendar/v3/calendars/primary/events |
| List Gmail messages | GET | https://www.googleapis.com/gmail/v1/users/me/messages |
| Send email | POST | https://www.googleapis.com/gmail/v1/users/me/messages/send |
| List Drive files | GET | https://www.googleapis.com/drive/v3/files |
Notes
- Google requires
access_type=offlineandprompt=consentto issue refresh tokens. Alter Vault handles this automatically. - If requesting
profileoremailscopes, theopenidscope is automatically included. - Refresh tokens never expire unless the user revokes access or the token is inactive for 6 months.
- Google enforces a limit of ~50 refresh tokens per user per app. Alter Vault’s connection deduplication prevents hitting this limit.