Curious about A, B, C, and D drives? Learn what they mean and how to use them effectively with Dropbox in this handy guide! - check it out now!

Forum Discussion

sosnos's avatar
sosnos
Explorer | Level 4
5 years ago
Solved

Download on scoped app

I got a Scoped App (App Folder) where I put a JPG image and now I want to download it with my Javascript app, on a Node JS environment. When I try to use the "filesDownload" method, I get the error ...
  • Greg-DB's avatar
    5 years ago

    This error message indicates that your API app has the "app folder" access type, but you're supplying the "Dropbox-API-Path-Root" header. For example, in the Dropbox API v2 JavaScript SDK, you might be setting that via the pathRoot option on the Dropbox object.

     

    Apps with the app folder access type are restricted to their own app folder, and so cannot access other roots. That being the case, you should not attempt to set another path root when using an access token for an app with the app folder access type, so don't set the pathRoot option.

     

    Also, regarding your path value, note that you should not include the path to your app folder itself. To access a file in your app folder, you would just use a path relative to the app folder, like "/MyImage.jpg".