odeke-em / drive

Google Drive client for the commandline
Apache License 2.0
6.69k stars 427 forks source link

drive init generates link that returns Error 400: invalid_request #1146

Open AJPoulter opened 1 year ago

AJPoulter commented 1 year ago

executing drive init generates a url for https://accounts.google.com/o/oauth2/auth?.. that, when used, returns 400, invalid request. Further error message: You can’t sign in because drive for Google Drive sent an invalid request....third party app is using an unsupported OAuth method. Using the alternative service account option (referencing the generated json credential) does work but the drive resources that can be accessed with the service account are not those of the user account for which the service account should act as a delegate, even though the service account is added to a project with google drive api enabled and has a Google Workspace Marketplace-compatible OAuth client associated with it.

Response: { "error": "unauthorized_client", "error_description": "Client is unauthorized to retrieve access tokens using this method, or client not authorized for any of the scopes requested." }

yanyang1024 commented 1 year ago

meet the same problem,anyone can help?

hightowe commented 1 year ago

@yanyang1024 - I suggest that you transition to rclone.

nickgreenway commented 1 year ago

Same issue here.

leleogere commented 1 year ago

Same issue

mxvin commented 1 year ago

consider this repo looks like not being actively maintained, transition to alternative seems more viable for general user. Sounds like an some changes been done on google side, maybe some enforcement/changes of roles/scope of Oauth, also maybe need to request and change the official api key. I believe this bug is not that hard to resolve, a pr is very welcome obviously

mxvin commented 1 year ago

Maybe its #1142 ???

jiraff537 commented 1 year ago

i try install this https://packages.gentoo.org/packages/net-misc/drive

and do "drive init" in command line and have this error:

Access blocked: drive for Google Drive’s request is invalid

***@gmail.com You can’t sign in because drive for Google Drive sent an invalid request. You can try again later, or contact the developer about this issue. Learn more about this error If you are a developer of drive for Google Drive, see error details. Error 400: invalid_request

VehementHam commented 1 year ago

I have the same issue.

gmordele commented 1 year ago

Same issue here

HRezaei commented 1 year ago

same!

dgonzalez211 commented 1 year ago

sam here!

TheFibonacciEffect commented 1 year ago

The error details are:

Error 400: invalid_request

The out-of-band (OOB) flow has been blocked in order to keep users secure. Follow the Out-of-Band (OOB) flow migration guide linked in the developer docs below to migrate your app to an alternative method. Request details: redirect_uri=urn:ietf:wg:oauth:2.0:oob

prajapatiraj-sudo commented 2 weeks ago

/home/Project/drive/Final/drive-master/src/remote.go

We have to chnage the RedirectURL = "http://127.0.0.1"

Another file location is /home/Project/drive/Final/drive-master/src/init.go

Whare we have to add the Value of

            g.context.ClientId = "ID"
            g.context.ClientSecret = "key"

After adding Install the Go Lang and then go the drive folder and Make and create new Bin file and try to use