Forum Discussion

b_diouf's avatar
b_diouf
Explorer | Level 3
7 years ago

What format should the "Path" be for Dropbox APIV2

I am trying to upload a file in a path using dropbox api however, using the api explorer via:

 

 

I am getting Error 400: for a wrong path I believe.

 

If I for example have a shared folder path via /Files/SharedPath/Uploads/.

 

What would be the proper path input to satisfy the example above?

 

Thanks,

b_diouf

  • Jay's avatar
    Jay
    Icon for Dropbox Staff rankDropbox Staff
    Hey there, I moved your thread to the API forum for our specialist to check it out!
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff
    When uploading a file via API v2, the path generally should be the desired destination path for the file, relative to the app's root, using "/"s.

    E.g., in your case, it sounds like you'd want to supply "/Files/SharedPath/Uploads/UPLOADME.txt", or whatever you want the name to be.

    You can get the paths for existing items using the returned Metadata.path_lower value, e.g., as returned by /2/files/list_folder[/continue] or /2/files/get_metadata.
    • b_diouf's avatar
      b_diouf
      Explorer | Level 3

      I've tried so for the path section i should place "/2/files/SharedPath/Uploads/"

       

      I've tried it but it is not working. Maybe you can give me another example of how to enter "path" based on a "/" file example?

       

      Thanks!

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,941 PostsLatest Activity: 2 days ago
351 Following

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!