I have written piece of code, that checks if my company application sends emails.
It used three gmail tests accounts, like servicename996test@gmail.com
, lets call them 996
, 997
and 998
, and opened them in such sequence.
996
refresh_token
expires every 7 days. However 997
, and 998
, have no such issues.
I've read that this is caused by "test application", explained here: ('Token has been expired or revoked' - Google OAuth2 Refresh token gets expired in a few days). Switching application to production requires some verification which I will not pass. This is a simple service for internal company use to check if notifcation emails are sent after certain actions take place.
I've created new account 995
to replace 996
, but issue occurs still for 995
instead.
I have to manually get new refresh_token
every Sunday, which is quite annoying.
Switching your application from testing to production will inf act mean that your refresh token stop expiring.
This is a separate matter form verification, and does not require verification.
As you can see form my app, I am in production and have been for years, but my app is not verified as it is internal just for me.
Just set your app to production, your refresh tokens will stop expiring.