Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
David Z.11
10 years agoNew member | Level 2
Empty path error from /sharing/list_shared_links
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
Replies have been turned off for this discussion
- Greg-DB10 years ago
Dropbox Community Moderator
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.1110 years agoNew 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: a9b5ab8a94939b5f00d02e1778070916RawSo you are able to obtain a list of all shared links using this endpoint? If so, can you provide details? - Greg-DB10 years ago
Dropbox Community Moderator
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.1110 years agoNew 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-DB10 years ago
Dropbox Community Moderator
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.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
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, Facebook or Instagram.
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!