Post SMTP – Token has been expired or revoked.(invalid_grant)
If you get either of these errors:
“Token has been expired or revoked.(invalid_grant)” or “Bad Request(invalid_grant)” most of the time it is a result of a security measure put in place by Google when clients update their Google passwords.
In an effort to further increase account security for Google Apps users, a recent change has been made to our security policy, whereby OAuth2 tokens issued for access to certain products will now be revoked when a user’s password is changed. For example, if a user loses their device, and changes their Google password, their mail and other data will stop syncing to that device when the password is reset.
Solution:
Grant Google permission again in Post SMTP
- Login to your WordPress dashboard at yourdomain.com/wp-admin (replace yourdomain.com with your own address)
- Click “Post SMTP” at the bottom of the left-hand menu.
- Click the “Grant permission with Google” link.
- You will be redirected to a Google page to approve the link. You may need to login to your Google account using the email your site sends to.
- Back on your site, send a test email by clicking the “Send a Test Email” link to confirm everything is working.
- You can then go to the email log under Post SMTP and re-send any emails that had this error.
Clients can contact Overhaulics to have this done, we will just require your Google credentials.