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,
You are correct, the endpoint /files/save_url is meant to save data from a specified URL into a file. That said, I'll pass this along as a feature request. I can't promise if or when that might be implemented though.
While it is not possible to save/copy folders directly to Dropbox via the API, especially from a URL, there is the option of creating folders via /files/create_folder_v2 or /files/create_folder_batch.
An option to simulate the "Copy to Dropbox" action, could be to retrieve the folder names from one Dropbox account, by calling /files/list_folder/[continue], and then have your app/integration create folders with the same name and hierarchy via /files/create_folder_v2 or /files/create_folder_batch on another Dropbox account.
bneese
10 months agoNew member | Level 1
Hi DB-Des,
Thanks for the quick reply! That would be a great feature for me, thank you for passing it along as a request.
I have thought about simulating the "Copy to Dropbox" action similar to how you mentioned, but can I call the /files/list_folder action on a public URL? In my use case, the owner of the Dropbox folder is not willing to "share" the folder with anyone, they will only expose the contents via a public URL.
- DB-Des10 months ago
Dropbox Community Moderator
Hi bneese,
To allow an API app to act on a user's behalf, the user would need to grant consent through the OAuth authorization flow. This ensures the app has the necessary permissions to perform actions on the user's behalf.
Regarding your question about calling the /files/list_folder from a public URL, could you provide more details on your specific use case? As previously mentioned, authorization would need to be granted by users in order to make requests to the Dropbox API.
- bneese10 months agoNew member | Level 1
Hi DB-Des,
Thanks again for your help. For now, I have am using an access token to test the logic and then I'll work on the OAuth flow.
Here's an example of a public URL I would be working with: 1115 Shady Lane 1-21-25 - Dropbox
This example contains a single folder with a few files inside, but the main use case would be hundreds of subfolders with more subfolders and files.
Since there is no save_url action for folders, I would iterate over the folder & files and use create_folder_batch and copy_batch_v2 to recreate the folder structure and copy the files, as you suggested.
My issue is that I can't find a way to use /list_folder on a URL, since the example folder hasn't been shared with me via Dropbox and isn't in my account, so I can't enter its name in the "path" parameter.
Sorry if this isn't clear, let me know and I can try to explain it another way.
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!