Rclone google drive authentication error

What is the problem you are having with rclone?

Hello, i'm a first time user and the first service i'm trying to configure is google drive.
I've followed the instructions in the tutorial (https://rclone.org/drive/) but when I get to the authentication step, google's response is always a 400 error.
I have tried already using another google account, using my own client_id, disabling ufw, and installing the beta version. All the other configs are set to default.

What is your rclone version (output from rclone version)

rclone v1.51.0

  • os/arch: linux/amd64
  • go version: go1.13.7

Which OS you are using and how many bits (eg Windows 7, 64 bit)

ubuntu 16.04, 64 bit

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)

Just a fresh config.
rclone config

The rclone config contents with secrets removed.

I'm trying to run the config for the first time, so
NOTICE: Config file "~/.config/rclone/rclone.conf" not found - using defaults

A log from the command with the -vv flag (eg output from rclone -vv copy /tmp remote:tmp)

rclone -vv config
2020/05/15 10:49:58 DEBUG : rclone: Version "v1.51.0" starting with parameters ["rclone" "-vv" "config"]
2020/05/15 10:49:58 NOTICE: Config file "/home/ielson/.config/rclone/rclone.conf" not found - using defaults
No remotes found - make a new one
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n
name> drive-magaivers
Type of storage to configure.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
 1 / 1Fichier
   \ "fichier"                                                                                         
 2 / Alias for an existing remote
   \ "alias"                                                                                           
 3 / Amazon Drive
   \ "amazon cloud drive"                                                                              
 4 / Amazon S3 Compliant Storage Provider (AWS, Alibaba, Ceph, Digital Ocean, Dreamhost, IBM COS, Minio, etc)                                                                                                 
   \ "s3"                                                                                              
 5 / Backblaze B2
   \ "b2"                                                                                              
 6 / Box
   \ "box"                                                                                             
 7 / Cache a remote
   \ "cache"                                                                                           
 8 / Citrix Sharefile
   \ "sharefile"                                                                                       
 9 / Dropbox
   \ "dropbox"                                                                                         
10 / Encrypt/Decrypt a remote
   \ "crypt"                                                                                           
11 / FTP Connection
   \ "ftp"                                                                                             
12 / Google Cloud Storage (this is not Google Drive)
   \ "google cloud storage"                                                                            
13 / Google Drive
   \ "drive"                                                                                           
14 / Google Photos
   \ "google photos"                                                                                   
15 / Hubic
   \ "hubic"                                                                                           
16 / In memory object storage system.
   \ "memory"                                                                                          
17 / JottaCloud
   \ "jottacloud"                                                                                      
18 / Koofr
   \ "koofr"                                                                                           
19 / Local Disk
   \ "local"                                                                                           
20 / Mail.ru Cloud
   \ "mailru"                                                                                          
21 / Mega
   \ "mega"                                                                                            
22 / Microsoft Azure Blob Storage
   \ "azureblob"                                                                                       
23 / Microsoft OneDrive
   \ "onedrive"                                                                                        
24 / OpenDrive
   \ "opendrive"                                                                                       
25 / Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
   \ "swift"                                                                                           
26 / Pcloud
   \ "pcloud"                                                                                          
27 / Put.io
   \ "putio"                                                                                           
28 / QingCloud Object Storage
   \ "qingstor"                                                                                        
29 / SSH/SFTP Connection
   \ "sftp"                                                                                            
30 / Sugarsync
   \ "sugarsync"                                                                                       
31 / Transparently chunk/split large files
   \ "chunker"                                                                                         
32 / Union merges the contents of several remotes
   \ "union"                                                                                           
33 / Webdav
   \ "webdav"                                                                                          
34 / Yandex Disk
   \ "yandex"                                                                                          
35 / http Connection
   \ "http"                                                                                            
36 / premiumize.me
   \ "premiumizeme"                                                                                    
Storage> 13
** See help for drive backend at: https://rclone.org/drive/ **

Google Application Client Id
Setting your own is recommended.
See https://rclone.org/drive/#making-your-own-client-id for how to create your own.
If you leave this blank, it will use an internal key which is low performance.
Enter a string value. Press Enter for the default ("").
client_id> 
Google Application Client Secret
Setting your own is recommended.
Enter a string value. Press Enter for the default ("").
client_secret> 
Scope that rclone should use when requesting access from drive.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
 1 / Full access all files, excluding Application Data Folder.
   \ "drive"
 2 / Read-only access to file metadata and file contents.
   \ "drive.readonly"
   / Access to files created by rclone only.
 3 | These are visible in the drive website.
   | File authorization is revoked when the user deauthorizes the app.
   \ "drive.file"
   / Allows read and write access to the Application Data folder.
 4 | This is not visible in the drive website.
   \ "drive.appfolder"
   / Allows read-only access to file metadata but
 5 | does not allow any access to read or download file content.
   \ "drive.metadata.readonly"
scope> 1
ID of the root folder
Leave blank normally.

Fill in to access "Computers" folders (see docs), or for rclone to use
a non root folder as its starting point.

Note that if this is blank, the first time rclone runs it will fill it
in with the ID of the root folder.

Enter a string value. Press Enter for the default ("").
root_folder_id> 
Service Account Credentials JSON file path 
Leave blank normally.
Needed only if you want use SA instead of interactive login.
Enter a string value. Press Enter for the default ("").
service_account_file> 
Edit advanced config? (y/n)
y) Yes
n) No (default)
y/n> 
Remote config
Use auto config?
 * Say Y if not sure
 * Say N if you are working on a remote or headless machine
y) Yes (default)
n) No
y/n> 
2020/05/15 10:50:24 DEBUG : Starting auth server on 127.0.0.1:53682
If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=hftaxfus3kLRC4UmnE_w-Q
Log in and authorize rclone for access
Waiting for code...

After that my browser opens, if I'm not logged in to my google account it asks for my password and after I receive a page that says:
400 That’s an error
The requested URL was not found on this server. That’s all we know.

Are you running it on a browser on the Ubuntu box? Is something else blocking it?

Yes, when I run the above commands in terminal, it will open my Firefox browser, if I'm not logged in to some Google account it will ask my pass and after that I get the 400 that's an error page.
It's not a VM and I tried disabling Ubuntu built-in firewall, so I don't think there's something blocking it.
As it asks for my pass and just after that I receive the error, I think there's something wrong with the url being generated by rclone to ask for my credentials, but as I don't have any experience with this I don't know how to test it

If the user you are using doesn't have access to the drive, that would potentially cause an error. You can try headless on another machine and see if it's something specific to that machine.

I ran through and authorized on an ubuntu machine and a PC machine and it works without an issue.

Thanks so much for the replies, just tested in another computer and it worked flawlessly, so I just copied the .conf file to my computer and it works now!
But do some of you have any idea of what might be happening that I cant take the authentication in the first pc?

Other than something blocking it like a virus scanner / firewall / malware / etc, not really.

i had this same problem when i was trying to create a new remote in rclone while using it in colab..i always gets this error
So i just create config using my pc and import it into colab always

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