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:
-
Retrieving the access token
-
Storing/caching it for the duration of its lifetime (60 mins)
-
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: