googleworkspace / browser-samples

Web samples for Google Workspace APIs
Apache License 2.0
326 stars 559 forks source link

How to get the refresh token? #171

Open SmirnovW opened 1 year ago

SmirnovW commented 1 year ago

Summary

I am in the process of setting up Google Workspace to work with the Google Sheet API. I am following the documentation and using the code samples from a repository.

I have encountered an issue where the token returned by requestAccessToken has a very short lifetime of only one hour. According to the documentation, this is by design. However, this means that users are required to provide their consent to share data and select their Google Account every hour, which can be quite inconvenient.

Is there a way to extend the access token?

Aw4ken1ngs commented 1 year ago

Faced exactly the same problem