Level up your Box knowledge with brand new learning paths on Box University. Visit training.box.com to get started

Box OAuth access token and refresh token- Standard practice

New post

Comments

4 comments

  • DavidGrossi

    Hi, I was wondering the same...

    Any answer so far?

    0
    Comment actions Permalink
  • juicepuppy

    Has anyone got an answer to this?

     

    Can't find information on refreshing a token via API anywhere.

    0
    Comment actions Permalink
  • Kourtney

    Hello all! 

     

    To answer the original question of: 

     

    "Can I create new access and refresh token from old token with each request?" 

     

    In short, No. Your code should prompt the user to start the oauth2 flow again if the refresh token is invalid! 

     

    Best, 

    Kourtney 

     

     

     

    0
    Comment actions Permalink
  • ngcbassman

    At least in the SDK .NET, the one that I'm using, there's a method call ExchangeRefreshToken with this:
    /// Refresh token used to exchange for a new access token. Each refresh_token is valid for one use in 60 days. Every time you get a new access_token by using a refresh_token, we reset your timer for the 60 day period and hand you a new refresh_token

    So it looks like there's a way to use the actual refresh token, to renew the 60 days and get a new refresh token using the old one.
    But I'm confused now because the last post is coming from a person that works in the company and is saying there's no way to do this, so I don't know.

    0
    Comment actions Permalink

Please sign in to leave a comment.