Gdrive authorization expiry

What is the problem you are having with rclone?

Trying to athorize gdrive connection the connection always expires after 60 minutes. I have noticed some discussion on the subject in this forum, but found no good solution!

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

rclone v1.60.0

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 ls gdrive:

or any command given after 60 minutes from autorization

The rclone config contents with secrets removed.

Paste config here

A log from the command with the -vv flag

2022/11/14 11:57:56 Failed to create file system for "gdrive:": couldn't find root directory ID: Get "https://www.googleapis.com/drive/v3/files/root?alt=json&fields=id&prettyPrint=false&supportsAllDrives=true": couldn't fetch token - maybe it has expired? - refresh with "rclone config reconnect gdrive:": oauth2: cannot fetch token: 401 Unauthorized
Response: {
  "error": "unauthorized_client",
  "error_description": "Unauthorized"
}

What's the output of rclone version?
What's your rclone.conf look like?

How did you setup your client ID and secret?

rclone version:
rclone v1.60.0

  • os/version: ubuntu 22.04 (64 bit)
  • os/kernel: 5.15.0-52-generic (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.19.2
  • go/linking: static
  • go/tags: none

rclone.conf:
[gdrive]
type = drive
client_id = 31585913587-3oh8i9habhnftgcggp09395imte66r82.apps.googleusercontent.com
client_secret = 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
scope = drive
token = {"access_token":"ya29.a0AXXX","to
ken_type":"Bearer","refresh_token":"1//0c1GtY6ZZZ","expiry":"2022-11-14T11:48:50.6473921+02:00"}
team_drive =

client ID and secret:
I tried with id and secret from API credentials as with default, so inputting none. Same result.

You'd want to remove that client ID / secret as you've shared it with the internet and remove your access tokens and whatnot.

If you remove the client ID/secret and rclone reconnect the remote, that would remove the client iD from the equation and you'd just need to reconnect the remote.

^^^^ if you'd like to go further on that.

Problem solved, I had a miss-configuration possibly due to different rclone versions on headless computer and my laptop.
Thank you for prompt help!
Timo

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