OAuth 2.0 Token Refresh with Python

Okay, I see. The first thing I’d recommend is that the OAuth flow is handled in your application. That way you can implement the logic for:

  1. Retrieving the access token

  2. Storing/caching it for the duration of its lifetime (60 mins)

  3. Refreshing the token

Here is a post with instructions on handling OAuth flow with a Python application. Take a look and let us know if you have any questions: