Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
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?
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!
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: a9b5ab8a94939b5f00d02e1778070916Thanks! 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.
Thanks for the reply. I should mention that I am using a Dropbox Business account with the "Dropbox-API-Select-User" header.
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.
Hi there!
If you need more help you can view your support options (expected response time for a 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!