I want to upload files using the java API for DropBox. The following code gets me the oauth_token and oauth_secret. but when ever I try to upload a file I get a exception.
You have specified api.getdropbox.com:80
as the host name. Try using api.getdropbox.com
instead.
Your class should NOT be in package com.dropbox.client
. Try moving it to a different (i.e. com.yourname.client
). It looks like you might be creating a name clash and inadvertently overriding something in the Dropbox client API.
You should use http-client 4.0.3 jar