Good question. It looks like our library uses requests-oauthlib, who’s docs are here: https://requests-oauthlib.readthedocs.io/en/latest/oauth2_workflow.html#refreshing-tokens
I think the best solution is the third option, automatic refreshing. With our lib in it’s current state, you should be able to do it with something like this:
Warning: The above code is psudocode, I haven’t tested that these are the right params in the right place.
This looks like something we will add to the client library in the future, as having you deal with the refresh logic can be a pain.
In the mean time, if you’d rather just get up and running asap. You can use the
try except logic of the first or second options in the link.