gdrive
gdrive copied to clipboard
auth error
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"
just use this version for now: #665
https://github.com/BugCode1/gdrive/releases/tag/2.1.2
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.
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
just use this version for now: #665
https://github.com/BugCode1/gdrive/releases/tag/2.1.2
please make a gif tutorial pleaase >>
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
just use this version for now: #665
https://github.com/BugCode1/gdrive/releases/tag/2.1.2
thanks, this worked for me.
Please post a screen recording of the process, blurring out specific data >>>
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.
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
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
ok sorry.. i understand now.....
4/0AWgavde6eXXXXdZwefCsaJtmJcE8nXXXXX0pvVGjS2rL-SBOXXXXXXBPA
this is the activation code.....
thank you so much
it doesnot wirk inside gogle colab
hope this can help. https://www.youtube.com/watch?v=a-zI2tN7kaE
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
For those looking to use a service-account
, I found this guide helpful on all the steps.
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:
- download the .tar.gz file for version 2.1.2 from BugCode1's clone
- extract gdrive.exe from that tgz file
- In a cmd or powershell window, run
gdrive about
. This will then prompt you with a URL - copy that URL from your cmd or powershell window and paste it into a browser address bar.
- Google will ask you to authenticate. Do so. Then approve "project-367116221053". This is the consent UI for OAuth.
- The Google consent UI will then try to redirect to localhost:1 and the browser will show an error. This is expected.
- 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 like4/0AWtgzh78TWfF8K66P6JCEBVNsg-Rqctd
. - go back to your cmd or powershell window and paste in that code.
- done. Now gdrive.exe will work.
I manage to solve this using
gdrive --service-account
, you have to create G drive API key from Google API Consoledownload 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 ❤️❤️