cancel
Showing results forĀ 
ShowĀ Ā onlyĀ  | Search instead forĀ 
Did you mean:Ā 
Announcements
Want to learn about updates that we've made to the Search experience on the Android and iOS apps?Well, you can learn from Luke on the Mobile App team right here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results forĀ 
ShowĀ Ā onlyĀ  | Search instead forĀ 
Did you mean:Ā 
1
Ask
2
Reply and help

path/not_found on create_shared_link_with_settings for Dropbox-API-Select-Admin auth (Business)

path/not_found on create_shared_link_with_settings for Dropbox-API-Select-Admin auth (Business)

mstanisz
New member | Level 2

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?

2 Replies 2

Re: path/not_found on create_shared_link_with_settings for Dropbox-API-Select-Admin auth (Business)

Greg-DB
Dropboxer

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,

 

Re: path/not_found on create_shared_link_with_settings for Dropbox-API-Select-Admin auth (Business)

mstanisz
New member | Level 2

This happens to be working. Thank you very much and have a nice day!

Who's talking

Top contributors to this post

  • User avatar
    mstanisz New member | Level 2
  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?