Closed physkets closed 4 years ago
It says that the token has been expired or revoked, but I did nothing of that sort, and the token seems to still exist when I checked https://console.developers.google.com/
https://developers.google.com/gmail/imap/xoauth2-protocol You have the ACCESS TOKEN and REFRESH TOKEN....
You have the ACCESS TOKEN and REFRESH TOKEN....
Okay, and?
I reset my client secret and re-generated my refresh token, and it works properly now. I don't understand why it was revoked/expired (I see no expiry for the refresh token anywhere).
@physkets When does a refresh token expire ?
Refresh tokens do not expire, unless there are few special conditions :
OfflineIMAP
.refresh token
has not been used for six months.refresh token
contained "Gmail" scopes. This means that the refresh token
will be invalidated only when he had previously given permission for accessing his Gmail, and then later changed his password. NOTE: For the rest of Google services, like YouTube, Google Calendar, etc., a changed password will not invalidate the refresh token
.OfflineIMAP
in our case - generated a new refresh token
for the user for more than 50 times. Only the 50 most recent refresh tokens
may be active. The 51st oldest refresh token
becomes invalid. I do not believe OfflineIMAP generates a new refresh token every time it runs.@chris001 Thanks for that detailed explanation, but I don't think any of those cases apply to me.
So I have no idea what might've caused this.
General informations
offlineimap -V
): offlineimap v7.3.3, imaplib2 v2.101 (bundled)Configuration file offlineimaprc
Logs, error
Steps to reproduce the error