I need a way to share same token between two remotes

I created a script to automatically access public Google Drive folder with user provided token.

For it to works it needs to create config file with following stracture.

[gdrive]
type = drive
scope = drive
token = {"access_token":"xxxxxx","token_type":"xxxxx","refresh_token":"xxxxx","expiry":"xxxxx"}
[tmp]
type = drive
scope = drive
root_folder_id = (folder ID of public folder)
token = {"access_token":"xxxxxx","token_type":"xxxxx","refresh_token":"xxxxx","expiry":"xxxxx"}

And the remotes share the same token.

But when rclone acquires a new token, it only applies to one of them, and rclone can no longer access tmp remote.

Link to a Github issue on my repository.

You wouldn't want to share a token between remotes.

You'd authorize each remote and it would get its own token and renew its own token.

You could also just use one remote and use --drive-folder-id? to access the other? (unless you are copying between the two)

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