Note that there are some explanatory texts on larger screens.

plurals
  1. PORedirect to m.box.com during obtaining the token. no token response what so ever
    text
    copied!<p>When I do <a href="https://api.box.com/oauth2/token" rel="nofollow">https://api.box.com/oauth2/token</a> in order to obtain access token it redirect me to m.box.com !!!</p> <p>I'm using JavaScript XHR POST, cannot get how come it manages redirect me to <a href="https://m.box.com/" rel="nofollow">https://m.box.com/</a> !?</p> <p>Here is my request:</p> <pre><code>Request URL:https://api.box.com/oauth2/token Request Method:POST Status Code:200 OK Request Headersview source Accept-Language:en-US,en;q=0.8 Content-Type:application/x-www-form-urlencoded Cookie:box_visitor_id=511bb5cfe018c0.09915316; country_code=US; box_redirect_url=https%3A%2F%2Fm.box.com%2F; box_redirect_rm=common_main; z=1pm9dat3tb82gs1s2njrdsocg4; referrer=; __utma=254217048.1806492505.1360770515.1360778764.1360781511.3; __utmb=254217048.14.9.1360786227431; __utmc=254217048; __utmz=254217048.1360770515.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=47569716.1075364291.1360770555.1360781565.1360783878.4; __utmb=47569716.5.10.1360783878; __utmc=47569716; __utmz=47569716.1360783878.4.4.utmcsr=api.box.com|utmccn=(referral)|utmcmd=referral|utmcct=/oauth2/authorize; RT=s=1360786281036&amp;r=https%3A%2F%2Fwww.box.com%2Fapi%2Foauth2%2Fauthorize%3Fresponse_type%3Dcode%26client_id%3Dqpome2tetr5oesmq62tut4brabsd9j1q%26state%3Dauthenticated Origin:platform://. User-Agent:Mozilla/5.0 (BB10; Touch) AppleWebKit/537.10+ (KHTML, like Gecko) Version/10.0.10.357 Mobile Safari/537.10+ Form Dataview URL encoded grant_type:authorization_code code:mj5wDvMwjbbWBlg2QRsN296OvMS9nsWf client_id:qpome2tetr5oesmq62tut5brabsd9j1q client_secret:1bCE76NVOe6c3Ro4mKXXrMqW7BLunib4 Response Headersview source Cache-Control:no-store Connection:close Content-Length:174 Content-Type:application/json Date:Wed, 13 Feb 2013 20:11:22 GMT Server:nginx </code></pre> <p>as you see it doesn't carry any response, instead it redirects me to <a href="https://www.box.com" rel="nofollow">https://www.box.com</a> and then to <a href="https://m.box.com" rel="nofollow">https://m.box.com</a> !! Can some one explain me why?</p> <p>It is Webworks HTML5 for Blackberry 10.</p> <p><strong>UPDATE:</strong></p> <p>After detaily looking at Network activity I notices when I have redirect_url as https:// it looks like:</p> <blockquote> <blockquote> <p>GET Request URL:<a href="https://www.box.com/api/oauth2/authorize?response_type=code&amp;client_id=qpome2te3r5oesmq62ttt41bdabsd9j1q&amp;state=authenticated" rel="nofollow">https://www.box.com/api/oauth2/authorize?response_type=code&amp;client_id=qpome2te3r5oesmq62ttt41bdabsd9j1q&amp;state=authenticated</a> Request Method:POST Status Code:302 Found</p> <p>GET Request URL:<a href="https://google.com/?state=authenticated&amp;code=S1KrsSQG5XWURvpFV8NrfqkuCpCxo2Z3" rel="nofollow">https://google.com/?state=authenticated&amp;code=S1KrsSQG5XWURvpFV8NrfqkuCpCxo2Z3</a> Request Method:GET Status Code:301 Moved Permanently</p> </blockquote> </blockquote> <p>But when I use URI scheme of any kind: like for example misha:// it looks like:</p> <blockquote> <blockquote> <p>GET Request URL:<a href="https://www.box.com/api/oauth2/authorize?response_type=code&amp;client_id=qpome2te3r5oesmq62tttbbddbsd9j1q&amp;state=authenticated" rel="nofollow">https://www.box.com/api/oauth2/authorize?response_type=code&amp;client_id=qpome2te3r5oesmq62tttbbddbsd9j1q&amp;state=authenticated</a> Request Method:POST Status Code:200 OK</p> <p>GET Request URL:misha://authorised.html?state=authenticated&amp;code=5h49cfldt0zWy8f8Y4IKewTTr07TFzkJ Request Headersview source Accept-Language:en-US,en;q=0.8 Status: <strong>CANCELLED</strong></p> <p>GET Request URL:<a href="https://www.box.com/" rel="nofollow">https://www.box.com/</a> Request Method:GET Status Code:302 Found</p> </blockquote> </blockquote> <p>.....</p> <p>When I use URI scheme which is registered ive got this:</p> <blockquote> <blockquote> <p>GET Request URL:<a href="https://www.box.com/api/oauth2/authorize?response_type=code&amp;client_id=qpome2te3r5oesmq62tttbbddbsd9j1q&amp;state=authenticated" rel="nofollow">https://www.box.com/api/oauth2/authorize?response_type=code&amp;client_id=qpome2te3r5oesmq62tttbbddbsd9j1q&amp;state=authenticated</a> Request Method:POST Status Code:200 OK</p> <p>GET Request URL:platform:///authorised.html?state=authenticated&amp;code=l793tAT7eVpl85gvr77ZdnIFHTGYVNsJ Request Method:GET Status Code:200 </p> </blockquote> </blockquote> <p>and then in goes for box.com all of a sudden no matter what is do in my authorised.html!??</p> <blockquote> <blockquote> <p>GET Request URL:<a href="https://www.box.com/" rel="nofollow">https://www.box.com/</a> Request Method:GET Status Code:302 Found</p> </blockquote> </blockquote>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload