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!
-
Go to Google API Console and choose Create New Project.
-
Once the project is created, click on "Go To Credentials".
-
On the credentials screen select Google Photos API, Web Browser (Javascript), and User Data. Then go to the next step.
-
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.
-
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.
Request scope
https://www.googleapis.com/auth/photoslibrary.readonly
. Use manually paste mode.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.
Click Save. It will bring you back to the Credentials screen.
-
Configure Credentials - choose OAuth client ID.
-
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
). -
Once you provided all the details you will be presented with OAuth client ID and client secret (keep it secret, keep it safe!).
-
Go back to your OAuth Consent Screen and submit for verification.
-
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.
-
Once that is done, go back to the Developer Portal Custom Auth configuration and provide your client ID and client secret.
-
Click save and you are ready to go.
-
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