Setup OAuth for Google Drive

Create your own Google Drive OAuth application to use with Filestack

Create your own Google Drive OAuth application

By default, you do not need to configure anything to start uploading files from Google Drive, Filestack is ready to go out of the box. When a user logs into their Google Drive account from your site, the Filestack company application will show up. You can configure it so that your application shows up instead in order to make a more seamless experience for your customers.

This is also a MUST if you are using Custom CNAME with your Filestack application. If this step is not completed prior to using CNAME in a production environment, your users will not be able to access Google Drive. Please note that this process requires scope approval from Google, which can take 3-5 business days. Let’s get started!

  1. Go to Google API Console and choose Create New Project.

    Screenshot showing Register your application step in Google API Console

  2. Once the project is created, click on "Go To Credentials".

    Screenshot showing The API is enabled step in Google API Console

  3. On the credentials screen select Google Drive API, Web Browser (Javascript), and User Data. Then go to the next step.

    Screenshot showing The API is enabled step in Google API Console

  4. Give your client a name.

    • Enter https://www.filestackapi.com for Authorized Javascript Origins
    • Enter https://www.filestackapi.com/api/client/googledrive/authCallback/open and https://www.filestackapi.com/api/client/googledrive/authCallback/saveas for Authorized Redirect URIs.

    Note: If you are using a Custom CNAME in your Filestack application you must add your CNAME subdomain here as well.

    Screenshot showing Credentials step in Google API Console

  5. Design your OAuth consent screen. This is the content your users will see when they connect to your Google Drive Application.

    Screenshot showing Credentials step in Google API Console

  6. Download your credentials

    • This will be a JSON file that contains your App Key and App Secret.

    Make sure to save the name of your Google Project ID.

  7. Before you add your credentials to your Filestack Developer Portal you will need to submit the Google App Verification form

    Make sure that the domain you will be using the picker on is verified with Google

    The Product name is the name of your application

    The Project ID will be the one you saved during step 6.

    The Client ID will be in the JSON file that you saved in step 6.

    The Privacy Policy will be the same link that you entered in step 5.

    You will need to ask for the https://www.googleapis.com/auth/drive.readonly scope in order to use Google Drive. The justification is that this scope is required to allow users to access their own Google Files.

    Where the form asks if there is any additional information you can state that this is related to the authorization for filestackapi.com

    Once you've submitted your form, it may take Google 3-5 days to respond. If you have any trouble with getting the application approved please reach out to us at [email protected]

  8. Once you've recieved approval from Google you will need to enter your Client ID and Key into your Developer Portal.

    In your Filestack developer portal click on Auth Keys under Credentials and scroll down to find the Google Drive App Key and App Secret. Enter your Client ID in the Gdrive App Key field and your Client Secret in the Gdrive App Secret field. Then click Save Auth Credentials at the bottom of the page.

    Screenshot showing Filestack Developer Portal