Setup OAuth for Google Photos

Learn how to set up OAuth for Google Photos and create your own OAuth application for seamless integration with Filestack. Get started now.

Create your own Google Photos OAuth application

By default, you do not need to configure anything to start uploading files from Google Photos, Filestack is ready to go out of the box. When a user logs into their Google Photos 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 Photos. 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 Photos 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. Google will ask you to set up a consent screen for your application first. This is the page your users will see when they connect to your Google Photos Application.

    Screenshot showing Credentials step in Google API Console

  5. Design your consent screen.

    • Give your application a name.
    • Set application type to Public.
    • Add logo.
    • Provide support email address. It will be visible to your users on the consent screen.

    Screenshot showing first part of the consent screen.

    Request scope https://www.googleapis.com/auth/photoslibrary.readonly. Use manually paste mode.

    Screenshot showing adding scope to the consent screen.

    Configure domains:

    • Add Application Homepage link.
    • Add Application Privacy Policy link. We used Filestack Privacy Policy at https://www.filestack.com/privacy.
    • Optionally add Terms of Service link.

    Screenshot showing domain configuration fot the consent screen

    Click Save. It will bring you back to the Credentials screen.

  6. Configure Credentials - choose OAuth client ID.

    Screenshot showing credentials creation screen.

  7. Configure Credentials - set origins and redirect URIs.

    • Give your application a name.
    • Set https://www.filestackapi.com as Authorized JavaScript origin.
    • Set https://www.filestackapi.com/api/client/googlephotos/authCallback/open as Authorized redirect URI.

    If you are using CNAME, replace www.filestackapi.com with your domain (https://www.fs.YOUR-FQDN).

    Screenshot showing credentials creation screen.

  8. Once you provided all the details you will be presented with OAuth client ID and client secret (keep it secret, keep it safe!).

    Screenshot showing OAuth credentials.

  9. Go back to your OAuth Consent Screen and submit for verification.

    Screenshot showing OAuth consent screen ready for approval.

  10. Verification form.

    Google will ask you to justify usage of the requested scopes. You have to explain how your users will access their Google Photos resources (through Filestack) and what is your application logic once the photo was selected and uploaded. Google might ask you to record a video screencast demonstrating that logic as well.

    Screenshot showing OAuth consent screen ready for approval.

  11. Once that is done, go back to the Developer Portal Custom Auth configuration and provide your client ID and client secret.

    Screenshot showing OAuth consent screen ready for approval.

  12. Click save and you are ready to go.

    Screenshot showing OAuth consent screen ready for approval.

  13. Once you've submitted your form, it may take Google 3-5 days to respond. Until then you can still use your application with up to 100 users. If you have any trouble with getting the application approved please reach out to us at support@filestack.com