One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
LrjRam
7 years agoNew member | Level 2
Receiving folder URL instead of file URL using list_shared_links
Hi, I was passing this API along with the parameters
EG:
URL: https://api.dropboxapi.com/2/sharing/list_shared_links
Parameters: {"path": "/10_20180815065702617/Asm_IMG-10-20181005155706.jpg"}
Instead of retuning the file path, It is returning the complete folder path.
https://www.dropbox.com/sh/6uvw8tbj6r46f28/AABOUUT2ixttiOQ_hS4QRna-a?dl=0
Please help me in this.
- Greg-DB
Dropbox Staff
[Cross-linking for reference: https://stackoverflow.com/questions/53052507/dropbox-receiving-folder-url-instead-of-file-url-using-list-shared-links ]
The /2/sharing/list_shared_links documentation states:
"If a non-empty path is given, 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. Links to parent folders can be suppressed by setting direct_only to true."
Since the file "Asm_IMG-10-20181005155706.jpg" is accessible via that folder link, the folder link is included in the result by default.
If you want it to return only links that refer to the specified directly, set the 'direct_only' parameter to true when calling. (If none exists though, and empty list will be returned.)
- LrjRam1Explorer | Level 4
Hi, It's working fine. Thanks.
About Discuss Dropbox Developer & API
Make connections with other developers807 PostsLatest Activity: 3 hours ago
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!