Asana / python-asana

Official Python client library for the Asana API v1
MIT License
303 stars 105 forks source link

How to refresh access_token via refresh_token (instead of code) after access_token gained via oauth is expired= #162

Open marfrede opened 1 year ago

marfrede commented 1 year ago

How is it possible to refresh my token when I already haven my asana.Client (oauth)

In the fist step I gained the access_token via the method fetch_token (asana.Client.session.fetch_token) Then I found the methods refresh_token from request_oauthlib.OAuth2Session. This method though is not implemented by the child class asana.AsanaOAuth2Session

So asana.AsanaOAuth2Session implements fetch_token but not refresh_token. Why is that and how can I refresh the token then??

jv-asana commented 1 year ago

Hi @marfrede, as you have stated we don't have a method implemented for refresh_token. Other developers have found solutions around this. See this discussion https://github.com/Asana/python-asana/issues/108 for more info.

We are currently evaluating approaches to generating our python library so it can be kept up to date and modern. If you have any suggestions or feature requests let us know.