Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

400 Bad Request when trying to use the example app #12

Closed
joemidi opened this issue Sep 5, 2016 · 4 comments
Closed

400 Bad Request when trying to use the example app #12

joemidi opened this issue Sep 5, 2016 · 4 comments

Comments

@joemidi
Copy link

joemidi commented Sep 5, 2016

I get the following error when I try and use the example app:

An error occurred during login - Unexpected API Response [400 Bad Request]

It gives me no information further than that.

I've added all the app credentials in the examples/app-auth/index.js file.

@mattwiller
Copy link

@joemidi You can add something like console.log(err); at https://github.com/box/box-node-sdk/blob/master/examples/app-auth/index.js#L101 to get more information about the error. I'll update the sample app later to include more error details on the page, but in the meantime you should be able to log it yourself.

mattwiller pushed a commit that referenced this issue Oct 26, 2016
Fixes #12.  Print the full error object out in the sample app so
users can debug more easily.
mattwiller pushed a commit that referenced this issue Oct 28, 2016
Fixes #12.  Print the full error object out in the sample app so
users can debug more easily.
@trantor-saurabh-barthwal

I am also getting the same issue. Help me for the same.

@mattwiller
Copy link

@trantor-saurabh-barthwal As noted above, you should be able to modify the sample app code to get more information about the error — I recommend logging err.response.body to see if there's more information from the API about what's going on. One common problem is that your app may not be authorized by your enterprise administrator. If you haven't already, you may need to contact your enterprise admin and send them the API key of your application so they can authorize it in your enterprise's settings.

@trantor-saurabh-barthwal

@mattwiller thanks for information. Yes you are right, my app was not authorized by my enterprise administrator.

This doc really help me: https://developer.box.com/docs/setting-up-a-jwt-app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants