Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
b_diouf
8 years agoExplorer | Level 3
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
4 Replies
- Jay8 years ago
Dropbox Community Moderator
Hey there, I moved your thread to the API forum for our specialist to check it out! - Greg-DB8 years ago
Dropbox Community Moderator
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_diouf8 years agoExplorer | 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!
- Greg-DB8 years ago
Dropbox Community Moderator
You should not include "/2/" as part of the path value. That's just part of the API endpoint URL itself.
A valid path would be "/Files/SharedPath/Uploads/UPLOADME.txt" for instance, but it depends on what folders you have in your account of course. Here's an example of how you would upload a file name "resume.docx" to a folder named "Documents": "/Documents/resume.docx".
A good way to work this out is by listing the contents of the account using /2/files/list_folder[/continue] with an empty path to start with:
https://dropbox.github.io/dropbox-api-v2-explorer/#files_list_folder
https://dropbox.github.io/dropbox-api-v2-explorer/#files_list_folder/continue
About Dropbox API Support & Feedback
Find help with the Dropbox API from 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!