gdrive icon indicating copy to clipboard operation
gdrive copied to clipboard

auth error

Open Feeh03114 opened this issue 2 years ago • 17 comments

When creating the link for authentication, google authentication returns this message: "Unable to login because project-367116221053 sent an invalid request. Try again or contact the developer about the issue. Learn more about the error If you are a developer of project-367116221053, please see the error details. Error 400: invalid_request"

Feeh03114 avatar Dec 19 '22 13:12 Feeh03114

just use this version for now: #665

https://github.com/BugCode1/gdrive/releases/tag/2.1.2

BugCode1 avatar Dec 19 '22 18:12 BugCode1

it didn't work, I'm using an instance on AWS. I can't log in there, I need to log in on my machine.

Feeh03114 avatar Dec 19 '22 18:12 Feeh03114

I had the same problem on ubuntu 22. This other approach worked for me: https://medium.com/@acpanjan/download-google-drive-files-using-wget-3c2c025a8b99

lucascheles avatar Dec 21 '22 21:12 lucascheles

just use this version for now: #665

https://github.com/BugCode1/gdrive/releases/tag/2.1.2

please make a gif tutorial pleaase >>

1kaiser avatar Dec 22 '22 16:12 1kaiser

I just wanted to chime in and say that I installed gdrive via brew yesterday, and wasn't able to use it because of this issue. Other pull requests say that this is because Google is deprecating (has deprecated?) oob.

I was not able to get gdrive to accept my copy+pasted code from the redirect url

Phredward avatar Dec 23 '22 02:12 Phredward

just use this version for now: #665

https://github.com/BugCode1/gdrive/releases/tag/2.1.2

thanks, this worked for me.

jessegoodier avatar Jan 02 '23 15:01 jessegoodier

Please post a screen recording of the process, blurring out specific data >>>

1kaiser avatar Jan 02 '23 15:01 1kaiser

Hi. I just wanted to let you know that I ran into the same problem, downloaded and tried v2.1.2, and it seems to work now.

virtadpt avatar Jan 03 '23 04:01 virtadpt

Thanks 2.1.2 seems to work.

Please note that when you click "allow" it will redirect to a non-working link; that's the workaround, because you need to use the code in the url itself (see the placeholder below): https://localhost:1/?state=state&code=<THIS_CODE_HERE>&scope=https://www.googleapis.com/auth/drive

digEmAll avatar Jan 03 '23 10:01 digEmAll

where to get the code?

i got same error like this.... why localhost?

The webpage at http://localhost:1/?state=state&code=4/0AWgavde6eXXXXdZwefCsaJtmJcE8nXXXXX0pvVGjS2rL-SBOXXXXXXBPA&scope=https://www.googleapis.com/auth/drive might be temporarily down or it may have moved permanently to a new web address

fachos avatar Jan 07 '23 10:01 fachos

ok sorry.. i understand now.....

4/0AWgavde6eXXXXdZwefCsaJtmJcE8nXXXXX0pvVGjS2rL-SBOXXXXXXBPA

this is the activation code.....

thank you so much

fachos avatar Jan 07 '23 10:01 fachos

it doesnot wirk inside gogle colab

1kaiser avatar Jan 10 '23 17:01 1kaiser

hope this can help. https://www.youtube.com/watch?v=a-zI2tN7kaE

rekucemong avatar Jan 14 '23 15:01 rekucemong

I manage to solve this using gdrive --service-account, you have to create G drive API key from Google API Console

download the key as .json file and store it on ~/.gdrive folder , and download the shared file like this

gdrive --service-account myKeyName.json download '1234gfsdvsvsdfsdf'

You should use File ID not the shared G drive url

SalimF avatar Jan 18 '23 20:01 SalimF

For those looking to use a service-account, I found this guide helpful on all the steps.

ELanning avatar Feb 26 '23 06:02 ELanning

regarding @Phredward 's statement:

[this error is happening] because Google is deprecating (has deprecated?) oob.

That is correct. The existing gdrive app has not been updated to comply with Google's changed support for the OAuth protocol. Google provided instructions, but the main source has not been updated.

The update available in the BugCode1 clone allows the gdrive OAuth dance to succeed, with some extra steps. To use it:

  1. download the .tar.gz file for version 2.1.2 from BugCode1's clone
  2. extract gdrive.exe from that tgz file
  3. In a cmd or powershell window, run gdrive about. This will then prompt you with a URL
  4. copy that URL from your cmd or powershell window and paste it into a browser address bar.
  5. Google will ask you to authenticate. Do so. Then approve "project-367116221053". This is the consent UI for OAuth.
  6. The Google consent UI will then try to redirect to localhost:1 and the browser will show an error. This is expected.
  7. In the error message you will see a URL of the form http://localhost:1/?state=state&code=******&scope=... Copy the code , what is in place of the **** in that URL. This will be a long odd-looking string like 4/0AWtgzh78TWfF8K66P6JCEBVNsg-Rqctd.
  8. go back to your cmd or powershell window and paste in that code.
  9. done. Now gdrive.exe will work.

DinoChiesa avatar Mar 07 '23 22:03 DinoChiesa

I manage to solve this using gdrive --service-account, you have to create G drive API key from Google API Console

download the key as .json file and store it on ~/.gdrive folder , and download the shared file like this

gdrive --service-account myKeyName.json download '1234gfsdvsvsdfsdf'

You should use File ID not the shared G drive url

This solution working like a charm thank you @SalimF ❤️❤️

senzNirojan avatar Mar 15 '23 10:03 senzNirojan