I would like to allow users of my application who do not have a Dropbox account to be able to access files shared by another user who does have a Dropbox account. I was hoping to use some form of "App Authentication" without specifying a user. If I simply provide my client id (with or without secret), I get "The given OAuth 2 access token is malformed."
I'll send this along as a feature request for app authentication support for this, but I can't promise if/when that would be implemented.
What do you want to do with the file at Dropbox's shared links? Since its just a public link, all you should really be able to get from the link is the file. (the path/permisions/etc of the file in the user's dropbox are not public)
To just read the file, take the URL and replace "?dl=0" with "?raw=1". You can try "dl=1" too but I think "raw=1" works better.
(if you're downloading a folder, not sure what Dropbox does, probably gives you a zip. Also, make sure your app can follow redirects since Dropbox will bounce you around before returning the actual file)
First of all, thank you for your quick response. This is a side project and the time I get to spend working on it is limited. So my replies will probably not be so quck! 🙂
Thank you for the specific idea regarding changing the URL. I had seen other posts about HTTP downloads, but had not run across this particular parameter change.
I'm writing a mobile Cordova app for a non-profit client who wants to use Dropbox as a way of sharing information publicly with others. Eventually, Dropbox would be just one of several ways to share the information, as I've made the backend datastore adaptable. I've had success using the JS Dropbox API to log-in and create the datastore as a series of files storing JSON objects. There is a base file (e.g. index file) in the app directory which points to subdirectories with individual files. Since the information is intended to be consumed publicly (through the same app), I cannot assume every consumer of the information can login or create a Dropbox account just to access the information.
Also, since the application is initially planned to be used in a third-world country, I would like to limit the amount of data transfer just to what is necessary. Thus, downloading an entire directory (even zipped) may not be ideal.
In conclusion, I can use HTTP downloads to access the information if necessary; but I would prefer to use the JS API if at all possible.
Greg, thank you for your quick response and for putting in the feature request to access publicly available data without authenticating. Please see my other response below for a more detailed account of what I'm attempting to do. Perhaps there is another way I have not considered?
We love to learn from the educators who use Dropbox. Whether you teach kids, teens, adults or a combination of all three, we want to know what apps and integrations you use with Dropbox to help with teaching. Which of the ones below is your favorite, or most used tool?