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

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.