Hi,
I had been able to successfully connect to dropbox using dropbox api. I am using the bundle dropbox-core-sdk 1.7.6 from maven repository.
But since recently I am getting the below error from the same code.
Caused by: com.dropbox.core.DbxException$BadResponse: unexpected response code: 400
at com.dropbox.core.DbxClient$4.handle(DbxClient.java:274)
at com.dropbox.core.DbxClient$4.handle(DbxClient.java:270)
at com.dropbox.core.DbxRequestUtil.doGet(DbxRequestUtil.java:265)
at com.dropbox.core.DbxClient.doGet(DbxClient.java:1912)
at com.dropbox.core.DbxClient.getAccountInfo(DbxClient.java:270)
at org.apache.camel.dropbox.utils.DropboxApp.connect(DropboxApp.java:42)
Any idea what could be going wrong?
Below is the code:
final DropboxAppConfiguration appConfig = new DropboxAppConfiguration(appKey, appSecret,
accessToken, host, port);
final DropboxApp app = DropboxApp.create(appConfig);
try {
client = app.connect();
logger.debug("Client connected: " + client.getAccountInfo().displayName);
} catch (final FileNotFoundException e) {
throw new IllegalArgumentException(e);
} catch (final IOException e) {
throw new IllegalArgumentException(e);
} catch (final DbxException e) {
throw new IllegalArgumentException(e);
}
Regards,
ksprasad