Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

auth error #666

Open
Feeh03114 opened this issue Dec 19, 2022 · 17 comments
Open

auth error #666

Feeh03114 opened this issue Dec 19, 2022 · 17 comments

Comments

@Feeh03114
Copy link

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"

@BugCode1
Copy link

just use this version for now: #665

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

@Feeh03114
Copy link
Author

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.

@lucascheles
Copy link

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

@1kaiser
Copy link

1kaiser commented Dec 22, 2022

just use this version for now: #665

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

please make a gif tutorial pleaase >>

@Phredward
Copy link

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

@jessegoodier
Copy link

just use this version for now: #665

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

thanks, this worked for me.

@1kaiser
Copy link

1kaiser commented Jan 2, 2023

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

@virtadpt
Copy link

virtadpt commented Jan 3, 2023

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.

@digEmAll
Copy link

digEmAll commented Jan 3, 2023

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

@fachos
Copy link

fachos commented Jan 7, 2023

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
Copy link

fachos commented Jan 7, 2023

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

4/0AWgavde6eXXXXdZwefCsaJtmJcE8nXXXXX0pvVGjS2rL-SBOXXXXXXBPA

this is the activation code.....

thank you so much

@1kaiser
Copy link

1kaiser commented Jan 10, 2023

it doesnot wirk inside gogle colab

@rekucemong
Copy link

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

@SalimF
Copy link

SalimF commented Jan 18, 2023

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

@ELanning
Copy link

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

@DinoChiesa
Copy link

DinoChiesa commented Mar 7, 2023

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.

@senzNirojan
Copy link

senzNirojan commented Mar 15, 2023

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 ❤️❤️

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests