hello i'build a Gmail api to automate checking my emails daily using api with python but the problem is the users tokens it expire all time there any way to prolong it to 6 months...
file is quickstart.py
hello i'build a Gmail api to automate checking my emails daily using api with python but the problem is the users tokens it expire all time there any way to prolong it to 6 months...
file is quickstart.py
Access tokens by design expire after one hour there is no way to change that, that is why you have a refresh token. Refresh tokens can be used to request a new access token when ever you need it.
A Google Cloud Platform project with an OAuth consent screen configured for an external user type and a publishing status of "Testing" is issued a refresh token expiring in 7 days.
To stop your refresh tokens from expiring set it to production.