cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Share your feedback on the Document Scanning Experience in the Dropbox App right here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unexpected response code 400

Unexpected response code 400

ksprasad
New member | Level 2
Go to solution

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

11 Replies 11

Greg-DB
Dropbox Staff
Go to solution
In the screenshot of the web site, I see you're looking at a folder at "/neges". It sounds like that's probably just a folder you created manually.

For an app with the "app folder" permission, like the app you have registered, per your second screenshot, Dropbox automatically makes the special app folder for you. By default that's located at "/Apps/<app folder name>", for the English localization, or a corresponding translation for other localizations, e.g. "Aplicaciones" for Spanish.

So, please check in your account at "/Aplicaciones/neges" for the actual app folder and put whatever files you want there. (It's empty by default.)

Tanny
Explorer | Level 3
Go to solution
You are the best !!!!! It finally works!!
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Tanny Explorer | Level 3
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?