Unable to complete gdrive oauth flow

What is the problem you are having with rclone?

Since around a couple of weeks ago I don't seem to be able to authenticate gdrive remotes with rclone, 1.58.x and 1.59.0 both do the same thing:

Doing autoconfig, the oauth flow opens and asks to allow/cancel, but when allowing I just get "something went wrong" and a 401 response with no information whatsoever (standard google behaviour), the thing is this is happening on:

  • Multiple accounts
  • Multiple devices
  • Multiple operating systems
  • Multiple locations/connections

I'm not really sure what else I can check, I probably haven't connected a remote for a few months so couldn't say when it stopped working as existing refreshes (on the same accounts, devices, locations) are just fine.

Nonsense response for https://accounts.google.com/signin/oauth/consent/approval:

401 Unauthorized, body:



I have been using my own api keys, but to rule out that being an issue I'm using the defaults for testing, but the behaviour is the same.

Run the command 'rclone version' and share the full output of the command.

rclone v1.59.0-DEV
- os/version: arch (64 bit)
- os/kernel: 5.18.5-arch1-1 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.18
- go/linking: dynamic
- go/tags: none

Which cloud storage system are you using? (eg Google Drive)

Google Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone config

The rclone config contents with secrets removed.


A log from the command with the -vv flag

n/a, but:

2022/07/11 16:10:22 DEBUG : test: config in: state="*oauth-islocal,teamdrive,,", result="true"
2022/07/11 16:10:22 DEBUG : test: config out: out=&{State:*oauth-do,teamdrive,, Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2022/07/11 16:10:22 DEBUG : test: config in: state="*oauth-do,teamdrive,,", result=""
2022/07/11 16:10:22 DEBUG : Starting auth server on
2022/07/11 16:10:23 NOTICE: If your browser doesn't open automatically go to the following link:
2022/07/11 16:10:23 NOTICE: Log in and authorize rclone for access
2022/07/11 16:10:23 NOTICE: Waiting for code...
2022/07/11 16:10:23 DEBUG : Redirecting browser to: https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=202264815644.apps.googleusercontent.com&redirect_uri=http%3A%2F%2F127.0.0.1%3A53682%2F&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive&state=1WumHY2eg0hzL1cFi9W0oQ

hello and welcome to the forum,

--- maybe this is the issue?
google changed the oauth process and so rclone had to change its behavior


ahh that may be a good point actually, I thought there was still some more time before they prevented it being used and the docs aren't particularly useful - did come across that post before actually but I figured if it had been disabled then rclone would use the new flow by default, is this not the case?

edit: nevermind, totally unrelated.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.