If you’ve already created an OAuth client for another Google service (like Gmail), you can reuse the same client. You’ll only need to ensure the Google Drive API is enabled and the appropriate scopes are added.

Getting Started

To connect your Google Drive to Swiftgum, you’ll need to create OAuth2 credentials in the Google Cloud Console. Follow this step-by-step guide to set up your credentials.

Creating OAuth2 Credentials

1

Create a Google Cloud Project

  • Go to the Google Cloud Console

  • Click on the project dropdown at the top of the page

  • Click on “New Project”

  • Enter a name for your project and click “Create”

2

Configure the OAuth Consent Screen

  • Go to “APIs & Services” > “OAuth consent screen”

  • Select the appropriate user type (External or Internal)

  • Fill in the required information:

    • App name
    • User support email
    • Developer contact information
  • Click “Save and Continue”

  • Add the necessary scopes (at minimum, you’ll need https://www.googleapis.com/auth/drive.readonly)

  • Click “Save and Continue”

  • Add test users if needed, then click “Save and Continue”

  • Review your settings and click “Back to Dashboard”

3

Create OAuth Client ID

  • Go to “APIs & Services” > “Credentials”

  • Click “Create Credentials” > “OAuth client ID”

  • Select “Web application” as the application type

  • Enter a name for your OAuth client

  • Under “Authorized redirect URIs”, add the callback URL from your Swiftgum admin panel

    • You can find this URL in the Swiftgum admin panel under Integrations > Google Drive
  • Click “Create”

4

Enable the Google Drive API

  • Navigate to Google Drive API in the API Library

  • Select your project

  • Click “Enable” to activate the Google Drive API for your project

  • Wait for the API to be enabled before proceeding to the next step

5

Save Your Credentials

  • After creating the client ID, you’ll be presented with your Client ID and Client Secret

  • Save these credentials securely as you’ll need to enter them in Swiftgum

Configuring Swiftgum

1

Access Admin Panel

Go to your Swiftgum admin panel
2

Navigate to Integrations

Navigate to Integrations > Google Drive

3

Enter Credentials

Enter the Client ID and Client Secret you obtained from Google Cloud Console

4

Save Settings

Save your settings

Your Google Drive integration should now be ready to use with Swiftgum.

Troubleshooting

  • If you encounter authentication errors, ensure that your redirect URI exactly matches what’s configured in Google Cloud Console

  • For production applications, you may need to verify your app through Google’s verification process

  • Make sure you’ve enabled the necessary scopes for your use case

Testing Your Integration

Before your Google Drive integration can be used in production, you’ll need to test it with authorized users. If your app is in “Testing” mode (which is the default for new projects), only approved test users can authenticate with your application.

1

Access OAuth Consent Screen

  • Return to the Google Cloud Console

  • Navigate to “APIs & Services” > “OAuth consent screen”

2

Add Test Users

  • Scroll down to the “Test users” section

  • Click “Add users”

  • Enter the email addresses of users who should be able to test the integration

    • These can be any Google accounts (not limited to Gmail addresses)
    • Each user must be added individually
  • Click “Save”

3

Test the Integration

  • Have each test user log into Swiftgum

  • Navigate to the Google Drive integration

  • Attempt to connect their Google Drive account

  • Verify that they can successfully authenticate and access their files

4

Collect Feedback

  • Gather feedback from test users about the authentication flow

  • Address any issues before moving to production

Once testing is complete and you’re ready to make your integration available to all users, you’ll need to submit your app for verification through the Google Cloud Console.