One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
mstanisz
7 years agoNew member | Level 2
path/not_found on create_shared_link_with_settings for Dropbox-API-Select-Admin auth (Business)
I try to integrate a web app I'm working on with Dropbox Business API.
The case is uploading some of the documents to specified folders and then generating the sharing links for them, to serve them from Dropbox rather than store them on app server or generating them on the fly.
My flow is:
1. I prepare the file to be passed to Dropbox API.
2. I construct a specific filepath for this file, formatted as `ns:<namespace_id>/app_name/path/to/file.pdf`.
3. I upload the file to Dropbox, using the Dropbox-API-Select-Admin authentication (I gathered the admin member id earlier).
4. Then I want to create a shared link for this file, using the same authentication method and the same path I constructed earlier.
I'm stuck at the last point thoug, as I get the following error (along with status 409).
{ "error_summary": "path/not_found/.", "error": { ".tag": "path", "path": { ".tag":"not_found" } } }
I tried to use file ID, I fiddled with the API explorer... Nothing.
I use the following headers - Authorization (being the token), Content-Type (application/json), Dropbox-API-Select-Admin (providing the admin member_id).
Along the path in request body, I add the requested_visibility param and set it to team_only (though I determined that even skipping this, the request still fails).
I upload the file using basically the same headers (though Content-Type differs a little) plus Dropbox-API-Arg and Content-Length. The body of the request is a file.
The arguments I provide are:
{ path: ns:<namespace_id>/app_name/path/to/file.pdf, mode: "add", autorename: true, mute: false }
The app status is Development. Permission type: Team member file access
I'm sure I missed something important. Maybe some app or team privileges that might seem not obvious?
Can anybody point me in the right direction?
- Greg-DB
Dropbox Staff
Thanks for writing this up! We'll check on that to see if it's not working properly.
You should be able make this work using the 'Dropbox-API-Path-Root' header though:
Dropbox-API-Path-Root: {".tag": "namespace_id", "namespace_id": "<namespace_id>"}
And then use the path like:
path: /app_name/path/to/file.pdf,
- mstaniszNew member | Level 2
This happens to be working. Thank you very much and have a nice day!
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,950 PostsLatest Activity: 7 minutes ago
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 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!