cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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: 

list_shared_links says I have no shared links...but I do have them..,

list_shared_links says I have no shared links...but I do have them..,

rnj1776
Explorer | Level 3

So...I made a call to `list_shared_links` precisely because a call to create a shared link said the link already existed...I didn't cache some of them originally...so I was writing code to detect this error and list shared links so it could cache them...but it's saying I have no files in a folder I know that I do....

curl -X POST https://api.dropboxapi.com/2/sharing/list_shared_links \
  --header 'Authorization: Bearer <token here>' \
  --header 'Content-Type: application/json' \
  --data '{"path":"/_Johnson'\''s Heavy Salvage/salvage folders/67918 - 2012 Kenworth T660 - CJ/Original"}'

I had my token in the curl command above and got:

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

But when I had it list all shared links without a path...it showed other folders...I copied the path line from the results and used it in a curl call...and it showed no shared links either...despite the fact it did in the API Explorer...but only if you put no path in...

Any help with this would be appreciated. I can't create new shared links to the files I'm calling for because it says they already exist...so my hands are tied.

Actually I do have one more question...

=====CreateSharedLink.ERROR: 'shared_link_already_exists/metadata/..'

The previous is one of my debug lines...the error returned has metadata/.., but sometimes it's ..., or ., sometimes no dots...I'm not sure if this is a Dropbox thing...or some byproduct of the Go library I'm using to access the Dropbox API.

Thanks, Steve

1 Reply 1

Greg-DB
Dropbox Staff

To clarify, were you calling /2/sharing/create_shared_link_with_settings with the "path" for that "Original" folder itself, or with a path for a file inside that folder? 

Note that the /2/sharing/list_shared_links works in the two different following ways:

  • "If no path is given, returns a list of all shared links for the current user."
  • "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."

So, supplying as path to a folder will not make it list the shared links for files inside that folder. If you want the shared links for a file, you need to specify the full path for the file.

Also, the variable anount of trailing periods are intentionally added by Dropbox, to discourage clients from doing exact string matching on these error string, in favor of prefix matching. This way, we can add nested errors without breaking clients.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?