Google Drive is a popular cloud storage service that allows users to store and share files online. Google Drive is one of the connectors available on our File Storage API. Integrating Google Drive into your application can enhance its functionality, allowing users to access their files directly from your app. This guide will walk you through the steps to create an OAuth app for Google Drive integration.
Our sandbox application didn't go through the full Google security audit. If the app or site doesn’t meet Google's security standards, Google might block you from signing into your account via it by default. This can be turned off if you understand the risk: https://myaccount.google.com/lesssecureapps. This guide describes how to create your own sandbox application.
Before you begin, make sure you have the following:
- A Google account
- An Apideck account
- Navigate to the Google Developer Console (https://console.developers.google.com/).
- Sign in with your Google account.
- If you haven't created a project yet, click the "Create Project" button and follow the prompts. Otherwise, select an existing project.
- In the Google Developer Console, click on the "Enable APIs and Services" button.
- Search for "Google Drive API" in the search bar and click on it.
- Click the "Enable" button to enable the Google Drive API for your project.
- Navigate to the "Credentials" tab on the left side of the Google Developer Console.
- Click on the "Create credentials" button and select "OAuth client ID" from the dropdown menu.
- Choose the appropriate application type, depending on your project (e.g., Web application, Android, iOS, etc.).
- Click "Create" to generate your OAuth client ID and secret. Note down these values, as you'll need them in your application.
- Navigate to the "OAuth consent screen" tab on the left side of the Google Developer Console.
- Choose "External" or "Internal" user type, depending on your app's target audience.
- Fill in the required fields, such as "App name," "User support email," "App logo," "Developer contact information," etc.
- Under "Scopes," click the "Add or Remove Scopes" button and add the "https://www.googleapis.com/auth/drive" scope to request access to the user's Google Drive.
- Save your changes and submit your consent screen for verification if required.
To enable the connection to your Google Drive instance and be compliant with the Google certification, it is required to use your own white label auth URIs.
💡 IMPORTANT: Once you have applied one of the options, don't forget to update the "Redirect URI" in your Google Drive configuration as described in step 5.
Add a custom domain name for Apideck Vault. This will allow you to white label the reference to Apideck's Vault.
- Create a CNAME record
Sign in to your DNS name server host and navigate to your DNS settings. Add a CNAME record with the value
[REPLACE_WITH_DESIRED_SUBDOMAIN] CNAME cname.vercel-dns.com.
- Contact Apideck
Get in touch with your Apideck contact or firstname.lastname@example.org to let us know about the custom domain you want to use, so we can configure & enable it for Apideck Vault.
- Wait for the changes to propagate
Congratulations! You have now pointed your custom domain to Apideck Vault! When DNS changes are made, you can expect a propagation time up to 24 hours (but mostly much less than that). This is because it takes time for the DNS to take effect across the internet. The actual time of propagation may vary in some locations based on your network setup.
- Update the "Redirect URI"
Update the "Redirect URI" in your Google Drive configuration as described in step 5.
- Save your changes and submit your consent screen for verification.
Now that you've set up your OAuth app, you can configure the Google Drive connector in Apideck using the client ID and secret generated earlier.
By following this guide, you have successfully created an OAuth app for Google Drive integration.