If anyone else is struggling with this, here's a solution. It requires that you create a Dropbox app in the App console (https://www.dropbox.com/developers/apps) and gives it file write permissions and generate an access (bearer) token. The file will be created as Dropbox/Apps/your-app-name/file.html
