cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Are you interested in hearing how one of our Community members uses Dropbox for sailing trips? Read all about it here.

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: 

Re: About list_shared_links

About list_shared_links

taro_suzuki1101
Explorer | Level 4

I'm using a Dropbox basic account and API v2.0.
Why do some files return a URL with / s / and some do not, even if I hit list_shared_links with a specific file path?
Also, what is the difference between "/ scl / fi" and "/ s /"?
Please tell me who knows.

4 Replies 4

Greg-DB
Dropbox Staff

The /2/sharing/list_shared_links endpoint will return existing shared links for files and folders in the connected account. Note that normal files don't have shared links created for them by default, so there won't be any returned for a file if one hasn't been explicitly created.

 

Some special kinds of items though, such as cloud docs like Paper docs, may automatically have shared links.

 

And different kinds of shared links have may have different components like you mentioned. For instance, "/s/" is used in shared links for individual normal files, and "/scl/fi" is used in shared links for some other kinds of items, such as cloud does like Paper docs.

taro_suzuki1101
Explorer | Level 4

Thank you for teaching me!
I have an additional question.

The return value of list_shared_links is
Some files
"Links": [{". Tag": "file", "url": "https://www.dropbox.com/s/~~~~~",]
On the other hand
"Links": [{". Tag": "folder", "url": "https://www.dropbox.com/sh/~"]
There is a file that returns the folder information first. What is the difference?
Is it possible that the file is restricted?
I don't know the cause, so please let me know who knows.

Greg-DB
Dropbox Staff

When supplying a particular path, the /2/sharing/list_shared_links endpoint "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, if you call it for a specific file and see a folder link, that means that there's a shared link for a parent folder that enables access to that requested file. If you only want to links to the file itself, "Links to parent folders can be suppressed by setting direct_only to true".

taro_suzuki1101
Explorer | Level 4

Thank you very much. I'm approaching a solution!

Need more support?