PluginsGoogle Drive
Get Credentials
Step-by-step instructions for obtaining Google Drive credentials
This guide walks you through obtaining all required credentials for the Google Drive plugin.
Authentication Method
The Google Drive plugin uses OAuth 2.0 authentication exclusively.
oauth_2(default) - OAuth 2.0 authentication
OAuth 2.0 Setup
Step 1: Create Google Cloud Project
- Go to Google Cloud Console
- Click Select a project → New Project
- Enter a project name and click Create
- Wait for the project to be created and select it
Step 2: Enable Google Drive API
- In the Google Cloud Console, go to APIs & Services → Library
- Search for "Google Drive API"
- Click on Google Drive API
- Click Enable
Step 3: Create OAuth 2.0 Credentials
- Go to APIs & Services → Credentials
- Click Create Credentials → OAuth client ID
- If prompted, configure the OAuth consent screen:
- Choose External (unless you have a Google Workspace)
- Fill in the required information:
- App name
- User support email
- Developer contact information
- Add scopes:
https://www.googleapis.com/auth/drive
- Add test users (for testing)
- Click Save and Continue through all steps
- Select Web application
- Configure:
- Name: Your application name
- Authorized redirect URIs: Add your callback URL (e.g.,
https://yourapp.com/auth/googledrive/callback)
- Click Create
- Copy the Client ID and Client Secret
- Store these securely
Storing Credentials:
Store your OAuth app credentials, then start the flow:
pnpm corsair setup --googledrive client_id=your-client-id client_secret=your-client-secret
pnpm corsair auth --plugin=googledriveThe CLI will print an authorization URL — open it in a browser. Once you approve, tokens are saved automatically.
To verify credentials were stored:
pnpm corsair auth --plugin=googledrive --credentialsRequired Credentials Summary
| Credential | Required For | Where to Find |
|---|---|---|
| Client ID | OAuth 2.0 | Google Cloud Console → APIs & Services → Credentials |
| Client Secret | OAuth 2.0 | Google Cloud Console → APIs & Services → Credentials |
| Access Token | OAuth 2.0 | Obtained automatically after OAuth flow |
| Refresh Token | OAuth 2.0 | Obtained automatically after OAuth flow |
For general information about how Corsair handles authentication, see Authentication.