6

I have installed the gdrive library for Mac by doing brew install gdrive.

My goal is to upload files from my local machine to Google Drive programmatically.

However, when I do gdrive upload it says:

"Sign in with Google temporarily disabled for this app

This app has not been verified yet by Google in order to use Google Sign In."

I have also been looking at the Google Drive API v3. https://developers.google.com/drive/api/v3/reference/files/create#try-it

However, I cannot find where to get my api key and access token mentioned in the document. All the searches for Google Drive API take my to Google Cloud.

How can I get around these limitations to upload to Google Drive?

Josiah
  • 207
  • 3
  • 13
William Ross
  • 3,568
  • 7
  • 42
  • 73
  • 1
    To get authorization to use Google APIs follow the steps on [this answer](https://stackoverflow.com/a/60114435/4243927). It will guide you in how to obtain credentials for your application, and perform Drive API calls. – Aerials Mar 05 '20 at 08:43
  • 1
    More up-to-date instructions can be found here: https://stackoverflow.com/questions/65316819/unable-to-open-google-xlsx-spreadsheet-also-google-drive-permission-blocked – Roland Pihlakas Feb 03 '21 at 02:33

1 Answers1

3

The first time you execute Gdrive, you should be given a URL. Paste the URL into your browser and follow the instructions. See here.

You will be asked to enter a verification code, which is obtained by heading to the url printed in the command's output and authenticating with the google account for the drive you want access to.

Further setup info can be found at the GitHub project page for Gdrive. Make sure to use Gdrive 2. I have been using this utility successfully for several years on Linux.

Cheticamp
  • 61,413
  • 10
  • 78
  • 131