Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<ol> <li>You register your application on Box</li> <li>After registration you receive clientId and clientSecret once on Box website</li> <li>You hardcode your credentials somewhere in your application</li> <li>First time your application needs to access Box API it should redirect user to <code>https://www.box.com/api/oauth2/authorize</code>, specifying your clientId, clientSecret and redirectURI as parameters. About redirectURI see below.</li> <li>The box.com website opens. User enters his own credentials in the web form on box.com</li> <li>User allows your application to access his files via API on the box.com website</li> <li>Box redirects user back to you application using redirectURI specified before. One of the parameters to this request is "code". This is a very short-lived (30 seconds) access code that is only aligable for obtaining real access token.</li> <li>During next 30 seconds your application should make another call to Box API to next URL: <code>https://www.box.com/api/oauth2/token</code>, specifying the previously obtained code. If everything was correct, your application receives an access_token, a refresh_token and "expires" values.</li> <li>Now your application can make requests to Box API, specifying access_token every time</li> <li>access_token expires in number of seconds, specified in "expires" field. It should be about 3600 seconds or 1 hour. Each time your application sees that access_token has expired, it should make another request to Box with the refresh_token and obtain a fresh access_token for another 1 hour.</li> <li>refresh_token itself expires in 14 days</li> </ol> <p>Note: if you develop a desktop application, then you should open browser for user on the step 4, redirectURI should be something like <code>http://127.0.0.1:8080/Callback</code> and you should run a small webserver just to catch the redirect with the code as in step 7.</p>
 

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