- Wrong password, or the account’s main password is used instead of an app password.
- A Google Workspace account signing in with a password, which Google no longer allows.
- For OAuth sign-ins: the access token has expired or lacks the https://mail.google.com/ scope.
[AUTHENTICATIONFAILED]: Invalid credentials (Failure)
GmailIMAPSign-in problem
The error usually looks like this:
What it means
Gmail’s IMAP server rejected the sign-in.
Common causes
How to fix it
- Use an app password (personal accounts with 2-Step Verification) or OAuth 2.0.
- Check that IMAP access is allowed for the account.
- If your app only supports passwords, use Auth-Email.
Tools to help diagnose it
Can’t update your app to use OAuth?
Auth-Email fixes sign-in errors like this one without changing your app, printer, scanner or script. It signs in to Gmail with OAuth on your app’s behalf, while your app keeps using a normal username and password over IMAP, POP or SMTP.