cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more 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: 

Empty path error from /sharing/list_shared_links

Empty path error from /sharing/list_shared_links

David Z.11
New member | Level 2

I am trying to use list_shared_links in the way described in the documentation: "If no path is given or the path is empty, returns a list of all shared links for the current user." (https://www.dropbox.com/developers/documentation/http/documentation#sharing-list_shared_links)

However when I give an empty path, I receive a 400 error: "Error in call to API function "sharing/list_shared_links": request body: path: '' did not match pattern '((/|id:).*)|(rev:[0-9a-f]{9,})'"

And when I give no path I receive a 500 error with no response data.

If I provide a path then it works as expected.

The deprecated endpoint "get_shared_links" works as expected with empty path, but lacks essential information that list_shared_links returns.

Is this a known issue/anybody else seeing this?

5 Replies 5

Greg-DB
Dropbox Staff

Thanks for the report! I can reproduce the unexpected error when supplying an empty path, which we'll look into, but I can't reproduce the 500 when not supplying a path. Can you share your code and output? The response headers would be useful in particular. Thanks in advance! 

David Z.11
New member | Level 2

I just send an empty JSON object {} or send {"direct_only": true}. Here are the response headers:

Server: nginxDate: Tue, 23 Feb 2016 19:46:43 GMTContent-Type: text/plain; charset=utf-8Transfer-Encoding: chunkedConnection: keep-aliveAccess-Control-Allow-Origin: *Access-Control-Expose-Headers: Accept-Ranges, Content-Range, ETag, Dropbox-API-ResultX-Dropbox-Request-Id: a9b5ab8a94939b5f00d02e1778070916
Raw
 
So you are able to obtain a list of all shared links using this endpoint? If so, can you provide details?

Greg-DB
Dropbox Staff

Thanks! That's helpful. We'll look into that error.

For reference, yes, both of these versions work for me:

curl -X POST https://api.dropboxapi.com/2/sharing/list_shared_links \
--header "Authorization: Bearer <ACCESS_TOKEN>"

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

The error you're seeing may be account-specific though, so we're looking into it specifically.

David Z.11
New member | Level 2

Thanks for the reply. I should mention that I am using a Dropbox Business account with the "Dropbox-API-Select-User" header.

Greg-DB
Dropbox Staff

Thanks! That also works for me, so it is likely an account-specific issue. We'll follow up here once we have an update for you.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    David Z.11 New member | Level 2
What do Dropbox user levels mean?