I'm working on a script to help other users of a remote server set up their rclone configuration for a shared Google Cloud Storage. Almost all information on the config file needs to be the same for all users except for the token. I created a template config that the script should use, but I'm having trouble finding the command I would need to run to get the token.
When I run the interactive configuration session, I am prompted to authenticate rclone with remote and select "No" which then gives me an rclone authorize command that looks like this:
I just copy this and paste it on my local machine to get the token. I would like to get that same rclone authorize command without having to go through the interactive session.
Run the command 'rclone version' and share the full output of the command.
But if you want many people to have the same access level as you do, simply copy your rclone.conf info for the bucket and have others paste the same info into their rclone.conf.
If you want many different levels of access then create the different level users and set them up.
Again copying and pasting the info from your conf to theirs should do the trick just fine.
Authorizations are not IP, or machine limited, it is just a matter if the conf has the details needed or not.
Think of like login in to gmail, if someone has your user/pass they can
Just keep in mind the creds Might give people access to other things not just bucket depending on security settings for the creds you are using.
Thank you for your response. That's the thing. I don't want everyone to have the same access level as I do and I can't set it up for them. We are using rclone as part of a data processing pipeline that will be shared with other people and I want to make this as easy to set up as possible.
Exactly
I'm sorry if I wasn't clear enough.
In summary, I want to be able to give the user the rclone authorize command I mentioned so that they can run it on their machines and get the token for me. I'm not sure where the large alphanumeric string comes from. I hope this makes sense.
// Authorize is for remote authorization of headless machines.
//
// It expects 1, 2 or 3 arguments
//
// rclone authorize "fs name"
// rclone authorize "fs name" "base64 encoded JSON blob"
// rclone authorize "fs name" "client id" "client secret"
So, the large alphanumeric is a base64 encoded JSON blob. I still don't know where that comes from, but using the client id and client secret as arguments got me the token that I needed: