cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Check out the Dropbox cheat sheet for getting started in 2021 here!

Discuss Dropbox Developer & API

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

Receiving folder URL instead of file URL using list_shared_links

Receiving folder URL instead of file URL using list_shared_links

New member | Level 2

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.

2 Replies 2

Re: Receiving folder URL instead of file URL using list_shared_links

Dropboxer

[Cross-linking for reference: https://stackoverflow.com/questions/53052507/dropbox-receiving-folder-url-instead-of-file-url-using-... ]

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.)

Re: Receiving folder URL instead of file URL using list_shared_links

Explorer | Level 4

Hi, It's working fine. Thanks.

Polls
Are you starting new work habits this year?

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?