Overview
If you would like your users to upload files from their Gmail accounts, you will need Google Gmail OAuth application created. This tutorial will walk you through the entire process, step by step, showing how the Google project should be configured and integrated with Filestack.
Create Project
Go to Google API Console and choose Create New Project.
Once the project is created, click on "Go To Credentials".
Configure consent screen
On the credentials screen select Google Gmail API, Web Browser (Javascript), and User Data. Then go to the next step - What Credentials do I need?
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 Gmail 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 ../auth/gmail.readonly
.
Configure domains:
- Add Application Homepage link.
- Add Application Privacy Policy link.
- Optionally add Terms of Service link.
Click Save. It will bring you back to the Credentials screen.
Configure credentials
Choose OAuth client ID type.
Configure Credentials - set origins and redirect URIs.
- Give your application a name.
- Set
https://www.fs.myapp.com/api/client/gmail/authCallback/open
as Authorized redirect URI. Remember to change www.fs.myapp.com with your CNAME domain.
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.
Verify application
Google pays attention to data privacy and users protection. Scope that we are asking for, gmail.readonly
, is restricted and therefore Google requires any application that uses it to go through the verification process where dedicated team will assess your use case and either approve your application or not.
Google might also ask you to run 3rd party security assesment (through selected partners) of your application.
You can read more about verification process here:
In order to start verification process, click Submit for verification
button at the bottom of youo consent screen.
Google will ask you to justify usage of the requested scopes. You have to explain how your users will access their Google Gmail resources (through Filestack) and what is your application logic once the email attachment was selected and uploaded.
Google might ask you to record video of how your application is used in your environment. To do that you will need to set yor application to Inernal, configure Filestack in the next step and use it with Google Account in your organization can grant access to the scopes requested by this app.
Developer Portal
Once that is done, go back to the Developer Portal Gmail Auth
configuration and provide your client ID
and client secret
.
Enable Gmail
, 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.