Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
I have been experimenting with the DBRoulette example. It is working fine when I create the app specifying access to the user's whole dropbox account. However, for privacy reasons I will want to restrict access to just a specific folder. When I set it up that way and create the "Photos" directory in the Apps directory, I get a 404 error when trying to read its metadata.
[WARNING] DropboxSDK: error making request to /1/metadata/sandbox/Photos - (404) Path '/Photos' not found
2015-07-01 07:51:26.710 DBRoulette[2535:209409] restClient:loadMetadataFailedWithError: The operation couldn’t be completed. (dropbox.com error 404.)
The "Photos" directory is certainly in the Apps folder. Isn't that where is should be?
Maybe I misunderstand the use case. I'd like the user to be able to drop files in this special folder and I can access them. However, the wording when you create the App says "My app only needs access to files it creates." Does this mean that the user can't create files and have them recognized? Do I have to use full access in order to accomplish that?
By default, the Photos folder exists at /Photos, so that DBRoulette example will only work for non-app folder permission apps, since app folders exist at /Apps/{app folder name}. You can create a Photos folder inside /Apps/{app folder name} manually though, e.g., via the web site.
Anyway, sample app aside, the "My app only needs access to files it creates." selection results in your app having the app folder permission. When a user links an app with the app folder permission to their account, a special app folder is created in the account, under /Apps/. The user can add any files or folders in that app folder and the app will be able to see them.
Greg,
Thanks for the response. I did just figure out my problem. The uncertainty was what the photosRoot should be in the case of a folder permissions app.
[self.restClient loadMetadata:photosRoot withHash:photosHash];
I had assumed it would be either "/Photos" or "/Apps/Photos" or maybe "Photos". Instead, it appears you specify "/" in this case and the rest is assumed. With "/" as the root it appears to be accessing the directory correctly.
Possibly I missed this in the documentation but if not, you might consider clarifying it in the docs.
Hello
I am using dropbox in my ios app i can access images and pdf files from route folder but i am not able to access the files from subfolders it give 404 error . So let me know how i can access subfolder contains its not downloading in iPhone.
If anyone guide me.
Thanks
Puneet
You should certainly be able to access files in subfolders using the API, by specifying the path of the subfolder, e.g., /foldername/subfoldername.
This thread was about a specific scenario with the sample app, so if you're still having trouble, please open a new thread with more details:
https://www.dropboxforum.com/hc/en-us/community/posts/new?community_post%5Btopic_id%5D=200209245
Please include the relevant code snippets, as well as the full output/error.
Hi there!
If you need more help you can view your support options (expected response time for a 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!