How to Hide/ByPass Authoriaztion Pop Up while accessing Google Drive API

143 Views Asked by At

I am using Google Drive API's using JAVA for getting drive files, i want to create a background job which will fetch the google drive files without any user interaction (eg asking for user to explicity Authorize).

In the example given below by google, after running this java program we need to explicitly hit URL in browser & click on Authorize for full execution of the program.

https://developers.google.com/drive/v3/web/quickstart/java

Using the Service Account I am able to fetch the google drive contents without any kind of user action (eg click on allow to authorize). I want to acheive the same flow for individual user accounts, I have the list of emailid and passowords for google accounts.

Other than service accounts, is there any method so that i connect to the authorization url in background using HTTPPost request and fetch the file list.

1

There are 1 best solutions below

1
On

I don't think there's another way of doing this aside from Service Accounts which you are currently using. You can try to use the Google Playground but this is for testing purposes only and not for production.