1

I am building an app which uses google calender api .The OAuth 2 protocol is used. I want to know when the access token gets expired,how to progamatically get a new access token using refresh token that we will have. I am using Node.js for building my app.

xomena
  • 31,125
  • 6
  • 88
  • 117
Rishabh Nigam
  • 223
  • 3
  • 10
  • https://developers.google.com/identity/protocols/OAuth2#expiration there are many reasons as described in the documentation, your application needs to handle everything, if api calls start failing start throwing errors or notifications, generate some critical level logs so some actions can be taken. – Gntem Dec 09 '17 at 13:28
  • In addition to Gntem's comment, you may refer with this [link](https://stackoverflow.com/a/10639505/5832311). Based from this [documentation](https://developers.google.com/identity/protocols/OAuth2WebServer#refresh), if you use a Google API Client Library, the [client object](https://developers.google.com/identity/protocols/OAuth2WebServer#creatingclient) refreshes the access token as needed as long as you configure that object for offline access. – abielita Dec 10 '17 at 17:54

0 Answers0