Cloud sync, Google drive token expiring

grantb

Cadet
Joined
Mar 15, 2019
Messages
2
Good day everyone,

I'm having a bit of trouble getting Cloud sync to work with google drive. I was able too get my google drive token from https://developers.google.com/oauthplayground/
and get a scheduled sync working however It keeps failing giving me a status of ( FAILED:RCLOI ) my guess is that it is due to the token refreshing but im not 100% sure.
If this is the case how can i make my token last longer or use the refresh token to automatically create a new one? If i'm heading in the wrong direction please point me in the right direction.

I appreciate any help,
thanks in advance
 

robles

Explorer
Joined
Jul 29, 2014
Messages
89
Does anything in this thread help? https://www.ixsystems.com/community/threads/cloud-credentials-cloud-sync-google-drive.69762/

Get your oauth token using rclone in the cli as delineated in https://rclone.org/drive/

I'm also stuck with an expiring token after 3600 seconds even though using the GUI to setup the token. Your token should look like this:

{"access_token":"XXX","token_type":"Bearer","refresh_token":"XXX","expiry":"2014-03-16T13:57:58.955387075Z"}

EDIT:

Well now it's working, so for documentation's sake:

If you've got an expiring token that doesn't update, make sure to get your token from the rclone cli and use the default application ID. I had a custom application client ID and application client secret setup, and copying the credentials would work, but not to refresh because oauth2 on Google's side needs a refresh token that matches the application client ID and the user credentials.
 
Last edited:

el_avispon

Cadet
Joined
Jun 30, 2019
Messages
1
Hello Robles, I get lost somewhere in your post, so, are you saying that by switching from custom ID to default ID rclone should refresh token despite expiry setting in configuration string?
Now I'm using customID and token is being updated
Thank you in advance
 

robles

Explorer
Joined
Jul 29, 2014
Messages
89
Hello Robles, I get lost somewhere in your post, so, are you saying that by switching from custom ID to default ID rclone should refresh token despite expiry setting in configuration string?
Now I'm using customID and token is being updated
Thank you in advance

In my experience, when I stopped using the token google gave me using a custom app ID, my token started updating automatically. But since it may be a google thing, it might work now with a custom app ID.
 

Evelen

Dabbler
Joined
Apr 9, 2017
Messages
17
Is is possible if you could write a little how-to guide to how I set this up?
 
Top