Welcome to the new Box Support website. Check out all the details here on what’s changed.

How to keep OAuth alive

New post

Comments

1 comment

  • SalsaShark42

    When they authenticate, you'll get an auth token and a refresh token via the redirect URI.  You can bank that in a keystore.  The next time your app needs to establish a Box connection, use the tokens from the keystore.  When successfully authenticated, you'll get a fresh pair of tokens that you can sock away for next time.  The refresh token is good for 60 days--if you go longer than that, then you'll have to go through the manual authentication process again.  Depending on which SDK you're using, you can provide keystore functions that will be automatically called when your token expires (they last an hour).

    0
    Comment actions Permalink

Please sign in to leave a comment.