• Resolved taigi100

    (@taigi100)


    I’ve set up the WP Mail SMTP with google workspaces via the gmail api and it worked fine. But after a week or so (of no usage) it stopped working and I had to re-login (recreate the connection).
    Is this common behaviour? Is there a way to persist the gmail token indefinitely?

    On a separate note, I also tried to set it up via SMTP, but wasn’t able to. It kept telling me I was using the wrong credentials (even tho I was using what google was telling me to use – is there still a valid example on this workflow?)

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Darshana

    (@darshanaw)

    Hi @taigi100,

    Thanks for reaching out! We noticed that the Google API connection might break from time to time if you’re using the “Test” mode on your Google App.

    When you get a chance, please head over to your Google App and publish it (see). Then remove your existing Gmail connection under the WP Mail SMTP -> Settings page and reconnect to it.

    I hope this helps. Thanks!

    Thread Starter taigi100

    (@taigi100)

    When it broke, the app was not in test mode. It was already published.

    Plugin Support Darshana

    (@darshanaw)

    Hi @taigi100,

    Thanks for getting in touch!

    As we have investigated, there could be several other reasons to break Gmail connections on a site. The OAuth token in Gmail will reset for any event breaking the connection, including but not limited to:

    1) Changing Google password.
    2) Enabling or disabling 2FA.
    3) Google account access reset.
    4) Activation of Google’s advanced protection program.
    5) Revocation of the app to profile.
    6) App OAuth permission revoked by Google.
    7) App was moved from public mode to private/internal mode by Google (or by a user whose user domain is not in the allowed org domain zone).
    8) App verification failure on reaudit.
    9) Suspension of Google account.
    10) The user requested a linked account unlinking
    11) The user does not use the app for 6 months (automatically expires refresh token).
    12) The user adds/removes sensitive or needs review scopes to the app but does not complete the app review process.
    13) If the user is at the maximum limit for OAuth tokens to a Google profile (50) or for the service (25 for example in analytics), activation of a new refresh key will also automatically revoke the earliest key.

    I hope this helps you to troubleshoot this issue further. Thanks!

    • This reply was modified 3 years, 6 months ago by Darshana.
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Google token expires?’ is closed to new replies.