I believe we should verify if the current access_token remains valid before do an API Call. After token expiration (defaults to 60min) time I received an HTTP 401 error because the current token is invalid. I was able to workaround this by invoking GAuth.checkAuth() before calling my APIs. But I believe the right way would be usin refresh_token. Or maybe using the token_info endpoint to validate the current token before each API call.
https://www.googleapis.com/oauth2/v1/tokeninfo?access_token={accessToken}
What do you think? Maybe I just didn't get how this is being done here...
I believe we should verify if the current
access_tokenremains valid before do an API Call. After token expiration (defaults to 60min) time I received an HTTP 401 error because the current token is invalid. I was able to workaround this by invokingGAuth.checkAuth()before calling my APIs. But I believe the right way would be usinrefresh_token. Or maybe using thetoken_infoendpoint to validate the current token before each API call.What do you think? Maybe I just didn't get how this is being done here...