Error while trying to request authorization
I am receiving this error while trying to initially request authorization via https://account.box.com/api/oauth2/authorize.
So in my case, it's not an issue with an expired token. I have yet to get passed the very first step of this three step process.
Also, I wrote this code awhile ago and it used to work. Something has changed on your end to keep it from working now.
I am on my second full day of trying to figure this out. Please help?
-
Hi ,
Just want to check you have seen this page already?
There is a step by step guide to help you generate your first pair of Access and Refresh tokens:
https://developer.box.com/docs/oauth-20
Is it the first leg where you are experiencing problems?
GET https://account.box.com/api/oauth2/authorize?response_type=code&client_id=MY_CLIENT_ID&state=security_token%3DKnhMJatFipTAnM0nHlZA
Can you provide a code snippet or error report of what you are seeing so we can have a closer look?
Thanks,
Peter -
It seems that my issue is with browsers (unless you know something that I don't).
Chrome and Firefox apparently don't care that your site via the form we fill out allows for cross domain communications. They both keep saying that http://localhost is not on the header's list of allowed domains. But it is (on the form for my app).
Internet Explorer however, does allow it with one caveat. Prior to Edge, you have to go into settings and tell it to allow your localhost to accept callbacks. In Edge, you have to put up with alerts that warn you they are happening. But it does work in IE/Edge.
And yes the issue was with the first step, where you get the code that you then swap for a token.
-
Hello, can you please share your exact flow so we can attempt to reproduce on our end?
1. Are you using a POST or GET to direct to https://account.box.com/api/oauth2/authorize?
2. Can you please share a screenshot of the specific network error in your Chrome network tab along with request/response headers (please strip out any sensitive information)?
3. What is the origin from which you're making this initial request to the OAuth2 endpoint?
4. Are you using any SDKs or sample code from Box?
Thanks!
Please sign in to leave a comment.
Comments
4 comments