Forum Discussion

vsipchenko's avatar
vsipchenko
Explorer | Level 4
8 years ago

Get all shared links in specifick folder

What is the way to get all shared links from specific folder


I am using Python SDK, so I see that there is a sharing_list_shared_links method, with 'path' arg.

It returns only totally all links I can access or specific one which I specify, but I can not choose the folder which content to display.

3 Replies

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    8 years ago
    The Dropbox API unfortunately doesn't offer a way to retrieve all shared links for items inside a specific folder, but I'll pass this along as a feature request.

    Using sharing_list_shared_links with a specific path only "returns a list of all shared links that allow access to the given path - direct links to the given path and links to parent folders of the given path", so the only workaround is to not specify a path, and then do the filtering client-side for items under that path.
  • vsipchenko's avatar
    vsipchenko
    Explorer | Level 4
    8 years ago

    Oh, it is sad!


    So maybe eventually you can give me some advice, my situation is like:


    I have images in different folders. In my application and I would like to display all images from specific folder, so I need 4 links related to each image, they are:


    1. Direct link to original image (to put it into <img> html tag), something like this:
    https://dl.dropboxusercontent.com/s/xre2lk78i61pctb/1.jpg?row=1
    2. Direct link to cropped preview image with specific size (also to paste into <img> tag)
    3. Link for downloading a file:
    https://dropbox.com/s/xre2lk78i61pctb/1.jpg?dl=1

    4. Link to Dropbox page

    https://dropbox.com/s/xre2lk78i61pctb/1.jpg?dl=0

     

    My solution was to receive shared links, and parse it to a format I need. Is there any other way to load such data from Dropbox?

    Especially I am interested in loading direct links to cropped preview.



  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    8 years ago

    Using those shared link modifications is probably the best option for this use case. The Dropbox API doesn't offer links to preview versions of images unfortunately, but I'll pass this along as a feature request. 

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from 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!