# I need a way to share same token between two remotes

**URL:** <https://forum.rclone.org/t/i-need-a-way-to-share-same-token-between-two-remotes/10421>\
**Category:** Feature\
**Created:** [June 11, 2019, 2:35pm UTC](https://forum.rclone.org/t/i-need-a-way-to-share-same-token-between-two-remotes/10421 "2019-06-11T14:35:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![axzxc1236](https://forum.rclone.org/user_avatar/forum.rclone.org/axzxc1236/32/2392_2.png) [@axzxc1236](https://forum.rclone.org/u/axzxc1236)\
**Post date:** [June 11, 2019, 2:35pm UTC](https://forum.rclone.org/t/i-need-a-way-to-share-same-token-between-two-remotes/10421/1 "2019-06-11T14:35:40Z")

</div>

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](https://github.com/axzxc1236/Rclone_Gdrive_public_folder_automation/issues/1).

---

<div class="post-metadata">

**Author:** ![Animosity022](https://forum.rclone.org/user_avatar/forum.rclone.org/animosity022/32/451_2.png) [@Animosity022](https://forum.rclone.org/u/Animosity022)\
**Post date:** [June 11, 2019, 2:47pm UTC](https://forum.rclone.org/t/i-need-a-way-to-share-same-token-between-two-remotes/10421/2 "2019-06-11T14:47:59Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [June 11, 2019, 5:46pm UTC](https://forum.rclone.org/t/i-need-a-way-to-share-same-token-between-two-remotes/10421/3 "2019-06-11T17:46:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://forum.rclone.org/uploads/default/original/2X/3/39ad3235f6ffec76ccd0c81616bd55697b4c300d.png) [@system](https://forum.rclone.org/u/system)\
**Post date:** [September 9, 2019, 5:47pm UTC](https://forum.rclone.org/t/i-need-a-way-to-share-same-token-between-two-remotes/10421/4 "2019-09-09T17:47:02Z")

</div>

Closed on September 9, 2019, 5:47pm UTC

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