Forum Discussion

Almer_'s avatar
Almer_
New member | Level 2
4 years ago

Unable to download shared file with no password protection

Hi there,

 

I would like to download a file on a shared link. The file(s) are not password protected. So when i'm using the browser I'm able to download the file without logging in.

 

- I'm using these REST api: /sharing/get_shared_link_file

- Using a registered app with the correct rights (all access at the moment)

- other calls like /files/list_folder on the public link are working

- checked: https://www.dropbox.com/developers/documentation/http/documentation#sharing-get_shared_link_file if i'm missing something

 

I'm getting an 409 conflict status code and the body:

{
    "error_summary""shared_link_not_found/.",
    "error": {
        ".tag""shared_link_not_found"
    }
}
When changing the path parameter to a non existance file in the header I'm getting: shared_link_not_found
 
Anyone know what i'm doing wrong?
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    To clarify, does the shared link itself refer to a particular file, or to a folder?

     

    If it refers to a file, you should not supply the "path" parameter when calling /2/sharing/get_shared_link_file.

     

    If it refers to a folder, you should supply the "path" parameter when calling /2/sharing/get_shared_link_file, and the value should be the relative path of the desired file inside the folder. So, for example, if the linked folder is named "Folder", and it contains a file named "File.ext", you would supply a "path" value of just "/File.ext". Or, as another example, if the linked folder is named "Folder", and it contains another folder named "Subfolder, and that "Subfolder" contains a file named "File.ext", you would supply a "path" value of "/Subfolder/File.ext".

     

    If this still isn't working as expected for you though, please share the code and parameter values you're using so we can take a look. If you'd prefer to share privately, you can open an API ticket here. In either case though, do not share your access token.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,949 PostsLatest Activity: 3 hours ago
352 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!