cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Tell us what you want to see on the Community here!
Close

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to get all shared links in a folder?

Highlighted

How to get all shared links in a folder?

Explorer | Level 3

For example if I have 5 files in folder /images,  how list all the shared links?  And I dont want to share the folder.

/images

   1.jpg

   2.jpg

    ...

   5.jpg

 

I tried https://www.dropbox.com/developers/documentation/http/documentation#sharing-list_shared_links

 

curl -X POST https://api.dropboxapi.com/2/sharing/list_shared_links \
--header "Authorization: Bearer xxxx \
--header "Content-Type: application/json" \
--data "{ \"path\": \"/images\"}"

 

It cannot list all the shared links, it returns: 

 

{"links": [], "has_more": false}

 

 

Thanks!

 

 

1 Reply 1
Highlighted

Re: How to get all shared links in a folder?

Dropboxer

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 /2/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 you'd need to either:

  • call /2/sharing/list_shared_links once for each specific file, or
  • not specify a path, and then do the filtering client-side for items under that path

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?