You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

arpit2011's avatar
arpit2011
Explorer | Level 4
5 years ago

Error 400 with Download API

Hello Experts,   I have a business requirement in which files could directly be uploaded from dropbox through my javascript based web application(SAPUI5). My application is SAP UI5 based web appl...
  • Greg-DB's avatar
    Greg-DB
    5 years ago

    arpit2011 I see that Здравко has already helpfully answered your questions. To confirm, a shared link is not a path, which is why you got that first error. A path would look like "/folder/file.ext".

     

    You can use the ID instead as you attempted, but the /2/files/download endpoint will return that 'path/not_found' error if the app doesn't have access to the identified file. For example, the access token may be for a different account, as Здравко said, or if the app is registered for the "app folder" access type, the app won't have access to the file if it exists outside its app folder.

     

    As for "How to get the access code in runtime through JS", getting an access token does initially require some manual user interaction, but you can store and re-use it after that. I recommend reading the OAuth Guide and authorization documentation for information on how that all works.

     

    By the way, you should never share your access token, as you did here in your images. I've redacted them for you, but for the sake of security, you should disable that access token since it was posted publicly. You can do so by revoking access to the app entirely, if the access token is for your account, here. Or, you can disable just this access token using the API.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,914 PostsLatest Activity: 45 minutes ago
333 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!