Do I need an authorization code to access the user box account?

I am developing a desktop application that will interact with the corporate box account.

The first time my application tries to access the administrator account, it will be redirected to the cover page. Box finally redirects the user to my redirected URL after accepting the administrator credentials. This redirected URL will have an authorization code. which is used to access and update the token.

My question is that I can save this authorization code for future use. ??

Say that in a month my application will again want to get access to the enterprise administrator account, then again I need to go through the above steps to get the auth code.

+4
source share
1 answer

Alok, yes, you can save access tokens and updates for future use. Some notes:

  • An access token must be included through the authorization header for each API request.
  • access token expires after 1 hour. You can use the update token to request a new pair of access / update tokens.
  • The update token expires after 14-60 days. If your application needs to complete the monthly process less often than this, you need to create a scheduled task or a cron task to update the pair of access / update tokens in the interim period. With this task / task, you can update tokens endlessly.
  • If the access and update tokens have expired, the user must again authenticate your application manually.
+2
source

Source: https://habr.com/ru/post/1480099/


All Articles