Welcome to the new Box Support website. Check out all the details here on what’s changed.

Error 400 when using box-java-sdk

New post

Comments

2 comments

  • kendomen

    i can't tell from the stacktrace what's actually wrong but have you done this?

    https://community.box.com/t5/Developer-Forum/Box-Java-SDK-Connection-Problem-SSLHandshakeException/m-p/27133/highlight/true#M1288

     

    0
    Comment actions Permalink
  • Rafterweasel

    I'm seeing this same error when using the BoxConfig from a parsed json file:

     

    BoxConfig bc=BoxConfig.readFrom(new FileReader("...myconfigfile.json"));
    BoxDeveloperEditionAPIConnection api=BoxDeveloperEditionAPIConnection.getAppEnterpriseConnection(bc);

     

    Exception in thread "main" com.box.sdk.BoxAPIException: The API returned an error code: 400
    at com.box.sdk.BoxAPIResponse.(BoxAPIResponse.java:70)
    at com.box.sdk.BoxJSONResponse.(BoxJSONResponse.java:30)
    at com.box.sdk.BoxAPIRequest.trySend(BoxAPIRequest.java:435)
    at com.box.sdk.BoxAPIRequest.send(BoxAPIRequest.java:221)
    at com.box.sdk.BoxAPIRequest.send(BoxAPIRequest.java:196)
    at com.box.sdk.BoxDeveloperEditionAPIConnection.authenticate(BoxDeveloperEditionAPIConnection.java:308)
    at com.box.sdk.BoxDeveloperEditionAPIConnection.getAppEnterpriseConnection(BoxDeveloperEditionAPIConnection.java:159)
    at com.box.sdk.BoxDeveloperEditionAPIConnection.getAppEnterpriseConnection(BoxDeveloperEditionAPIConnection.java:191)
    at boxadapter.JWTAuth.main(JWTAuth.java:45)

     

    Anyone have any ideas?  

     

    Thanks!

     

     

    0
    Comment actions Permalink

Please sign in to leave a comment.