We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.

Forum Discussion

Polas's avatar
Polas
Explorer | Level 4
2 years ago

Dropbox API, I can't upload a file to Dropbox (err. 401 Unauthorized)

Please, help: I can't upload a file to Dropbox (err. 401 Unauthorized) I am using Delphi XE3, Indy THttp component. Please, can you look at the header and body of the message being sent to see if th...
  • Greg-DB's avatar
    2 years ago

    Polas Здравко is correct; new Dropbox access tokens are not persistent. Dropbox is no longer offering the option for creating new long-lived access tokens. Dropbox is switching to only issuing short-lived access tokens (and optional refresh tokens) instead of long-lived access tokens. You can find more information on this migration here.

    Apps can still get long-term access by requesting "offline" access though, in which case the app receives a "refresh token" that can be used to retrieve new short-lived access tokens as needed, without further manual user intervention. You can find more information in the OAuth Guide and authorization documentation. There's a basic outline of processing this flow in this blog post which may serve as a useful example.

     

    And for debugging issues like this, you should print out the HTTPS response body, as it should contain a more useful error message (such as 'invalid_access_token' or 'expired_access_token'). You may need to refer to the documentation for your network client for information on how to access the response body.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,877 PostsLatest Activity: 6 hours ago
325 Following

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 or Facebook.

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!