How to create OAuth 2.0 permanent access token

Viewed 189

Current OAuth2.0 accesstoken is dynamic and generated for every 3396 seconds. I am using few APIs which needs this token to be used as header. Is there any way to create a permanent static accesstoken and store it somewhere so that I don't need to dynamically create one everytime.

2 Answers

The Access Token is short lived by design. You have three options:-

  1. Create a Refresh Token
  2. Silently obtain a new access token each hour
  3. Use a Service Account

which option is best for you depends on the architecture of your app.

Related