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

Error while trying to request authorization

New post

Comments

4 comments

  • rocks

    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

     

    0
    Comment actions Permalink
  • KPAX

    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.

    0
    Comment actions Permalink
  • KPAX

    to clarify, as long as I can only do this via Internet Explorer, my situation is NOT resolved.

    0
    Comment actions Permalink
  • tonyjin

    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!

    0
    Comment actions Permalink

Please sign in to leave a comment.