Is there a way to increase the life of an authentification token?

  • 1
  • Question
  • Updated 5 months ago
When receiving an authentication token from the ShareFile API  it always includes the "Expires_in" of 8 hours. I've gone into admin settings to ensure that the settings in "Authentication" are set to

 Log inactive users out after: Never
Re-authenticate after: 30 days

but neither seems to affect it.
Photo of Joshua Reed

Joshua Reed

  • 2 Posts
  • 0 Reply Likes

Posted 5 months ago

  • 1
Photo of Dale Smith

Dale Smith, Employee

  • 124 Posts
  • 19 Reply Likes
Hi Josh,

Those settings are more for the client applications than they are for the API oauth token. I believe the Log inactive users out is specific to web app where if a user hasn't performed an action in that time frame, they log the user out and invalidate the token.  

As for your actual question, there is no way to extend the life of a single OAuth access token. However you can receive a new access token by using the refresh oauth flow without requiring your user's to log in again. This page documents how you can use the refresh token received from your original /oauth/token request to get a new access token.

http://api.sharefile.com/rest/oauth2.aspx

Thanks,
Dale Smith
Photo of Joshua Reed

Joshua Reed

  • 2 Posts
  • 0 Reply Likes
Thank you for the prompt reply!