Level up your Box knowledge with brand new learning paths on Box University. Visit training.box.com to get started

Unable to fully authenticate using oauth: Error code 400

Answered
New post

Comments

3 comments

  • jcleblanc

    Hi  ,

     

    I don't see anything directly wrong in the code, so let's see what else it may be:

    1. If you print out the code that comes back, does it look correct? It should be an alphanumeric string.
    2. In the OAuth 2 app you created at developer.box.com, is the redirect URL the same as the one that you are setting in your code?
    3. Just to test, can you enable all scopes and also the "Perform actions as users" option? 

    That should help us get a bit closer to the solution. 

     

    Thanks,

    Jon

    0
    Comment actions Permalink
  • northwestern

    Hi ,

     

    I've solved the issue: it turns out my client secret was incorrect.

     

    This would have been easier to solve had there been a better error message I think – even something like "invalid credentials" would have made me check the client id/secret.

     

    Thankfully, a Box employee on GitHub helped me out, and told me it was a problem with either my client id or secret. Come to find I had copy/pasted the client id twice accidentally, so this was an easy fix. 

     

    Thanks for the reply.

    0
    Comment actions Permalink
  • jcleblanc

    I'm glad to hear that you were able to resolve the issue. Also completely agree, that error response with lack of message didn't do much to help the situation. 

     

    With that said, let's talk about next steps. We've been doing some extensive work on trying to identify major hurdles in the onboarding process. One of those hurdles was around error responses, and also around the documentation on how to resolve those errors. As a next step we'll be working on creating a plan around attempting to resolve any vague errors like this, with an ideal target around unifying the errors and docs together. I know this isn't needed for you right now with this issue resolves, but I just wanted to be transparent that we are working towards improving this holistically on the platform.

     

    - Jon

    0
    Comment actions Permalink

Please sign in to leave a comment.