Headless redirect URL / remote setup without rclone on another machine

Hi - first of all, thanks for a fantastic project. I’ve read the remote setup tutorial already, but I have a question about how I can get around having rclone installed on my laptop / host machine.

Instead of running rclone authorize "dropbox" on my laptop, I ran it on my remote server and am told to visit a URL like http://127.0.0.1:{port}/auth. I visited that page in a headless browser / could print the HTML to the console and get the standard Dropbox Oauth page, which I used to access the Dropbox authorization URL, which was something like https://www.dropbox.com/1/oauth2/authorize?client_id={client ID HERE}&redirect_uri=http://localhost:{PORT}/&response_type=code&state={SOME HASH}.

When I visit that URL in my laptop’s browser, I get the correct auth page for Dropbox, and am able to authorize rclone to access my Dropbox account. I’m then redirected to http://localhost:{port}/?state={state hash}&code={code hash}.

Can I use the {state hash} or {code hash} in that URL to paste back into rclone for authorization? Or is that not sufficient? And if not, is there any way to go about this? Basically I want to avoid having anything on a local machine and go through the entire flow headlessly on a server. I realize this is a limitation of the OAuth flow but I’m trying to work around it by acting like the server is the main machine and there is no remote setup, just confused what I need to paste into rclone for it to work / what I can do in my rclone.config to make it work.

Thanks a ton in advance, and will be donating to the project shortly as well as it’s been amazing to work with.

-zzz

You should use your headless browser to fetch http://localhost:{port}/?state={state hash}&code={code hash} and that will complete the process I think.

I have run through the process using linx before and it does work provided the pages don’t have too much javascript in.