I can get an access token from the website at https://www.dropbox.com/developers/apps/info/****** for my server-based app.
Those tokens seem to work for what I need, which is just to retrieve uploaded files and manage files in one directory. But those tokens seem to expire. How can I get a refresh token for this app?
I tried:
curl https://api.dropboxapi.com/oauth2/token \
-d code=<ACCESS_TOKEN>
-d grant_type=authorization_code \
-d redirect_uri=<REDIRECT_URL> \
-u "<APP_KEY>:<APP_SECRET>"
with the appropriate values but I get an error of "code doesn't exist or has expired" even when I try it right away after generating a new access token on the website.