Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
bneese
10 months agoNew member | Level 1
Save URL Endpoint for Public Folders via API
When I use the files/save_url API endpoint and enter the URL of a public folder, I get an invalid_url error. I am assuming this is because this endpoint only works on files, not folders, is that corr...
DB-Des
Dropbox Community Moderator
10 months agoHi bneese,
Thank you for providing additional context. In the case of the /files/list_folder[continue] endpoint, the path parameter only accepts paths relative to the authorized user's Dropbox. It is not possible to pass a URL as the path for that endpoint either.
bneese
10 months agoNew member | Level 1
Hi DB-Des,
Understood, thank you. It is a bummer that there is a very limited number of endpoints that can accept URLs. Please let me know if that changes in the future.
- DB-Des10 months ago
Dropbox Community Moderator
My apologies, after reviewing the developer documentation, I realized there is actually a way to pass a share link URL to the /files/list_folder endpoint.
You can pass that link to the shared_link parameter. Note that in this case, the path will be relative to root of the shared link.
- bneese10 months agoNew member | Level 1
Hi DB-Des,
That's a good point about the shared_link parameter. Because the folder wasn't specifically shared with me, but rather is a publicly accessible link, will this work? I'm getting an error using the Python SDK: "expected type dropbox.files.ShareLink, got string".
If I try using the /sharing/list_folders endpoint, no shared links are returned since there are no folders specifically shared with the current user (again, trying to use this on public URLs).
Am I just doing something wrong in how I'm formatting my shared_link parameter?
dbx = dropbox.Dropbox(access_token) save_url = 'https://www.dropbox.com/scl/fo/qva8f9u5ivu7r6uq4c0w5/APiGek2ClDY99vfvErrHPm8/_2025/1115%20Shady%20Lane%20%201-21-25?dl=0&rlkey=gx9b5grnz5t02o9aqxndjeqdn' dbx.files_list_folder(shared_link=save_url, path='')- DB-Des10 months ago
Dropbox Community Moderator
The error you’re encountering is due to parameter 'shared_link' expecting a value of type 'SharedLink' rather than a string. The reason for this is that shared URLs could be password-protected, and by providing an object of type 'SharedLink', you ensure that both the string and any associated password can be included properly.
In your case, you can just modify your 'save_url' parameter as such:
save_url = dropbox.files.SharedLink(url="<SHARED_LINK_URL>")
About Discuss Dropbox Developer & API
Make connections with 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!