[AUTHENTICATIONFAILED]: Invalid credentials (Failure)

GmailIMAPSign-in problem

The error usually looks like this:

A1 NO [AUTHENTICATIONFAILED] Invalid credentials (Failure)

What it means

Gmail’s IMAP server rejected the sign-in.

Common causes

  • 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.

How to fix it

  1. Use an app password (personal accounts with 2-Step Verification) or OAuth 2.0.
  2. Check that IMAP access is allowed for the account.
  3. 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.

← Look up another email error