Config/create for dropbox

Hi all,
I am now trying to use the API features (config/create) for rclone, I am now trying to create a config with type=dropbox. Whenever I try to create a new config, rclone will ask me to visit the link like "12 7.0.0.1:53682/auth?state={STATE}" , is there any possible way that I can manually get dropbox access token and pass into config/create to create a config or I could generate the dropbox authorization link like "www .dropbox. com/1/oauth2/authorize?client_id=5jcck7diasz0rqy&redirect_uri={REDIRECT_URL}&response_type=code&state={state}" ?

rclone v1.53.1

CentOS Linux 8 (Core)

Dropbox

It isn't easy avoiding oauth...

Dropbox used to let you paste in a token, but they have gone all in on oauth now.

You or you user will need to do oauth it is just a question of where and who does it.

You can pass in the token in the config create and stop rclone trying to create it easily enough by setting token=XXX config_refresh_token=false. How you get the token is tricky though. You can use rclone authorize

Hi Nick,
I see, is that possible that I could get the value of state and client id so that I could pass make an oauth link myself and authorize without rclone on the client side?

Thanks

If you can implement oauth yourself - you'll need a client_id and client_secret you can pass the token back to rclone - is that what you want to do?

Hi Nick,
Yea, is that possible for me to do that? Could you give me a lead on this?Sorry I am quite new to rclone not sure how it works.

Thanks.

If you can implement the oauth flow (it is complicated) then you can pass the token you get back to rclone.

I suspect that will be more work than you want to do though.

Can you explain more why you need this?

Hi Nick,
Thank you for giving the lead, I will look into it. The reason I needed this is because I am trying to work on a web app that could help on managing configs with permission control, so users can only see their own configs or the team configs. So in this case when they trying to add a new config (dropbox) it is hard that only work on only browsers so I am finding the ways to achieve this.

Thanks

1 Like

Hi Nick,

I have some problem with the config/create for dropbox, the expected output would be like this:

token = {"access_token":"xxx","token_type":"bearer","expiry":"0001-01-01T00:00:00Z"}

but what the output I saw is

token = map[access_token:xxx]

the map I have sent to config/create is

{
"name": "name",
"type": "dropbox",
"parameters":{
"token":
{
"access_token": "xxx"
},
"config_refresh_token": false
}
}

Anything that I did wrongly on this?

This should be a string with the token in so something like

"token": "{\"access_token\": \"xxx\"}",
1 Like

Hi Nick,

Thanks for your help and actually achieve what I wanted. Thanks for the lead.

1 Like

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