Applescript to get Dropbox file direct/share link

applescriptdropboxfinder

Is it possible to retrieve the direct/share link of a file that is in my Dropbox folder, but not in its Public subfolder?

I'd like to use that for an Alfred workflow. I saw many tutorials on how to do that for files that are in the Public folder but I'd like to use the new way Dropbox handles files sharing.

Thanks!

Best Answer

To generate a shared link from a private folder you must make a request to Dropbox's servers using authentication with the Dropbox API. See the docs here. I am not sure you can do that from an applescript, maybe you can use curl. But if you want this in an Alfred workflow you can always use another scripting language like php or python, which are more suitable.