Our system already successfully acquires a short lived token, but I want to get a refresh token for Dropbox. We successfully use refresh tokens with systems like SharePoint so are familiar with the flow.
Our app has full access to Dropbox (not just the App Folder) so I am not sure if that is the problem, but we get this error from dropbox when we attempt to get the token:
invalid_request : unknown field "token_access_type"
This is the request that is made
https://api.dropboxapi.com/oauth2/token?client_id=<DropBoxClientId>&client_secret=<DropBoxClientSecret>&redirect_uri=<RedirectURL>&code=<AccessCode>&token_access_type=offline&grant_type=authorization_code
If we call it without token_access_type=offline then it works fine, but we only get a short lived token and no refresh token.
Are refresh tokens only available if you are accessing the App Folder only? Am I not calling it correctly?