Skip to main content
Question

Access_token refresh_token renewal

  • May 22, 2025
  • 2 replies
  • 2 views

Forum|alt.badge.img

Hi,

 

I would like to be able to get the the following accomplished using API. Any suggestions appreciated

 

1. Get access_token first time

2. Get refresh_token first time

3. Use both to fetch metadata on files and folders

4. Refresh information on nightly basis

5. Get new access_token if expired

6. Get new refresh_token if expired

 

Steps 1,2,3 are not a problem the first go around but the access_token expires in 60 minutes. How do I get new access_token and refresh_token without having the user intervention?

2 replies

Forum|alt.badge.img

Does this link mean I can refresh the access_token and refresh_token programmatically without requiring user intervention to Grant Access?

 

https://developer.box.com/en/guides/authentication/access-tokens/refresh/


Forum|alt.badge.img

  yes you can refresh an access token using a refresh token. That is the sole purpose of a  refresh token.

 

Every time you use a refresh token it returns a new access token and refresh token. A refresh token can only be used once, and needs to be used within 60 days.