We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
andrejpet
3 years agoExplorer | Level 4
Access token generated with refresh token got permissions revoked
As per the dropbox offline flow, I've set up a flow where I've generated a refresh token after the owner of the dropbox (me) - Generated an access code using this URL https://www.dropbox.com/oauth...
andrejpet
3 years agoExplorer | Level 4
Greg-DB
Luckily I still have my old refresh token and I performed another request and this is what I got back.
Unable to write file at location: uploads/1.txt. Client error: `POST https://content.dropboxapi.com/2/files/upload` resulted in a `401 Unauthorized` response:\n
{"error_summary": "missing_scope/...", "error": {".tag": "missing_scope", "required_scope": "files.content.write"}}
Please keep in mind that I was not getting this 401 error before and I was successfully going throw the whole flow.
Hence my explanation that my refresh token generated an access token that does not have all the permissions.
Здравко
3 years agoLegendary | Level 20
andrejpet wrote:...
Hence my explanation that my refresh token generated an access token that does not have all the permissions.
andrejpet, Yes, of course, but this doesn't happen suddenly! Actually you never had such permission granted to the refresh token and following to the access token. You need to make sure you have the needed scope (i.e. files.content.write) and perform OAuth anew. Only changing scopes is NOT enough! Such a change is not retroactive. It'll affect tokens from following OAuths only.
Hope this helps.
About Discuss Dropbox Developer & API
Make connections with other developers
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!