Thanks for all the great work on rclone!
I am wondering if there is any way to trigger a token refresh from a wrapper script and get the new token via stdout. I understand I can run a simple command and rclone will often do a token refresh if the access token has expired but I cannot figure out how to capture the new token without opening the config file, which for my application, does not exist, since I am trying to use the environment variable configuration approach. Basically, I don’t want the tokens to ever be written to the disk in plaintext but I would like to be able to refresh tokens for storage backends that require that.
Alternatively, I would be willing to use the encrypted configuration approach and allow rclone to write the new refreshed token to the disk. Unfortunately, I cannot figure out any way to script the setup of a new encrypted configuration file. Trying to script the answers to the “rclone config” command have proved unsuccessful when there is a password prompt as part of the setup.
Basically, I’m trying to figure out one of two things (either approach is fine):
- How do I refresh a google drive or dropbox token (arbitrary Oauth rclone backend) using the environment variable configuration approach
- How to I setup a brand new encrypted config file, supplying the new encryption password from a wrapping application. I know how to provide the encrypted config file password via an environment variable (RCLONE_CONFIG_PASS) but I don’t know how to setup a new encrypted config file, using only environment variables or via the remote control console.
Is there a way to do either of these things?
Thanks in advance!