Peter
Peter

Reputation: 956

Get Dropbox public folder's metadata without authentication

I'm about to create a blog and wanted to host the content on Dropbox (only Markdown files, everything else is on my server) because I want to be able to quickly upload and edit posts from all my devices without having to get some FTP app on them.

So far I managed to access files via https://dl.dropboxusercontent.com/u/********/<sub-folder>/<file name>.md and like pointed out here I can get the last-modified attribute via etags.

However, I'm stuck at getting a file list (or a folder's metadata in general). Is this possible without using OAuth?

Upvotes: 0

Views: 854

Answers (2)

tqk2811
tqk2811

Reputation: 567

make "Public" folder and go https://www.dropbox.com/enable_public_folder

back to your dropbox folder (web) right mouse at file in public folder and chose "Copy public link..."


Update: As of September 1, 2017 public links have been disabled for all users. https://help.dropbox.com/files-folders/share/public-folder

Upvotes: 0

user94559
user94559

Reputation: 60143

No, this isn't possible without using the API. But why are you against using the API?

Feel free to use my tool https://dbxoauth2.site44.com/ to get an OAuth access token for your account. Then just do an HTTP GET to https://api.dropbox.com/1/metadata/auto/<path> with an Authorization header of Bearer <token>. Ditto for getting the actual file contents, just use /files/auto/<path> instead.

Oh, unless you're doing this client-side in JavaScript? In that case, this won't work since you can't give your access token out to the client (where it could be abused by anyone who visited your website).

Upvotes: 2

Related Questions