Client ID is in production, but I still get expired token errors after a while

What is the problem you are having with rclone?

This topic is in succession to a different topic of mine (how does Client ID work, exactly). The assumption there was that putting the client ID into production should alleviate any refresh problems. However, i have accessed google drive for about a week or so, and now I get expired tokens on both my PC and laptop. Both PC and laptop use the same Client ID. So the question is, and I really hope I am wrong: do I have to request a verification (How does client ID work, exactly? Can it time out? - #20 by ncw)?

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


gbonnema  ~  rclone version  1
rclone 1.60.1

  • os/version: fedora 37 (64 bit)
  • os/kernel: 6.2.8-200.fc37.x86_64 (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.19.3
  • go/linking: dynamic
  • go/tags: none
    gbonnema  ~ 
####  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`)  
<!--  You should use 3 backticks to begin and end your paste to make it readable.   -->

gbonnema  ~  rclone lsf ggl:  127
Failed to create file system for "ggl:": couldn't find root directory ID: Get "": couldn't fetch token - maybe it has expired? - refresh with "rclone config reconnect ggl:": oauth2: cannot fetch token: 400 Bad Request
Response: {
"error": "invalid_grant",
"error_description": "Token has been expired or revoked."
gbonnema  ~ 

#### The rclone config contents with secrets removed.  
<!--  You should use 3 backticks to begin and end your paste to make it readable.   -->

type = drive
client_id =
client_secret =
scope = drive
token = {"access_token":""}
team_drive =

type = drive
client_id =
client_secret =
scope = drive.file
token = {"access_token":""}
team_drive =

#### A log from the command with the `-vv` flag  
<!-- You should use 3 backticks to begin and end your paste to make it readable.  Or use a service such as or   -->

pasted output with sufficiently clear messages

Did you rclone config reconnect your remotes after changing the client_id to production? I think that may be necessary to get a new refresh token.

Yep, I did, both on my PC and on my laptop. I had to or it would no longer have worked.

EDIT: the first few times I actually did not use the command rclone config reconnect, but just did rclone config and modify existing thing. That worked the same although rclone config reconnect is a lot faster (shorter route).

As far as I know you've done everything you need.

Maybe the fact it is production takes a while to filter through? I don't know.

I don't think many rclone users have done verification - you only need to do that if you have 3rd party users of your client_id.

Ok, thanks for the reply. I will wait and see if it happens more often and in the meantime I will double check the "being in production" . Maybe I did something wrong (in the googly eyes). I will let you know! It seems it is in production (printscreen).

1 Like

I should have looked on the second of the same screen. There it shows (see screenshot): 7 days!! So, I wonder if everyone has this on their consent page?


It's not related as that's for creating new users, not getting a refresh token.

When I had to assign my client ID (I re-installed the laptop), I got the following screen. For some reason google wants me to do verification. Could it be because I always assign 1 to the scope? I am not completely sure what is happening here.


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