Mailbind
Blog

Gmail App Password: Where to Create One and When to Use It

Create a Gmail app password step by step, learn when to use it for IMAP or SMTP, and see what to check if the code doesn't work in your email app or client.

· 5 min read

What is a Gmail app password?

A Gmail app password is a 16-character code generated in your Google account. It lets an email client or tool sign in to Gmail over IMAP or SMTP when signing in with your usual password isn't possible. It requires 2-Step Verification to be turned on.

This code replaces your main password, only in the tool where you enter it. Your Google password stays unknown to that application.

In practice, it is used to:

  • read your messages in an IMAP client that can't sign in through Google;
  • send emails over SMTP from software, a website or a support tool;
  • connect an older device or a printer that sends scans by email.

It has one practical advantage: you can revoke it at any time without changing your main password. Your other connected tools keep working, because each one uses its own code.

It also has a limitation. An app password opens broad access to your inbox, with no distinction between reading, sending or deleting. So treat it like a password: store it in a password manager and don't share it.

Where to create an app password in your Google account

The steps are the same for most personal Google accounts. It takes a few minutes.

  1. Turn on 2-Step Verification. Without it, the option doesn't appear. You can set it up on the Security page of your Google account, under "How you sign in to Google".
  2. Open the Security page of your Google account (myaccount.google.com, then "Security").
  3. Look for "App passwords". The easiest way is to use the search bar at the top of the page, since the link isn't always shown in the menu.
  4. Name the use. Enter the name of the tool, for example "Helpdesk" or "Office printer". This name will help you find the code later.
  5. Copy the code shown. It is 16 characters long.
  6. Paste it into the tool in place of your usual password, with your Gmail address as the username.

The code is shown only once. If you close the window without copying it, you can't view it again: you'll need to create a new one. Store it in your password manager right away.

If the option is missing

It may be missing on some accounts. This is the case for a Google Workspace account whose administrator has restricted this feature, or an account enrolled in the Advanced Protection Program. In that case, you can't turn it back on yourself. You need to ask your administrator, or choose another sign-in method.

To revoke an app password

Go back to "App passwords", find the code by its name, then delete it. The tool concerned loses access. Your other codes and your main password stay unchanged.

When to use it, and when to prefer another method

Use an app password when the tool connects over IMAP and SMTP but can't open the Google sign-in page. It's a last resort, not a first choice.

When it makes sense

  • An older email client that only shows a "password" field.
  • A printer or scanner that sends documents over SMTP.
  • A support or tracking tool that reads a shared address and doesn't support Google sign-in.
  • An internal script that sends notifications from a dedicated address.

In every case, create a separate code for the tool and give it a recognizable name. You'll then be able to revoke it on its own.

When to prefer OAuth sign-in

If the tool offers "Sign in with Google", choose that option. OAuth sign-in goes through a Google window, where you can see what the tool is requesting. You can limit the permissions granted, for example read without deleting, and remove the authorization from your account.

An app password makes no such distinction. It gives access to the inbox comparable to a regular session: reading, sending, deleting. Anyone who gets the code gets that access, with no second verification.

There is a practical consequence. Don't share it by email or internal chat, don't leave it in a document open to the team, and don't reuse it from one tool to another.

If the tool supports neither OAuth nor app passwords, the best decision is sometimes to switch tools.

What should you do if the app password doesn't work?

If sign-in fails, go through the following points in order. The cause is almost always simple.

  1. The pasted code. Google shows it in four blocks separated by spaces. Depending on the tool, those spaces cause a rejection. Paste the code as one string, with no space at the beginning or end.
  2. IMAP turned off. In Gmail, open the settings, then "Forwarding and POP/IMAP". Check that IMAP access is enabled. Without it, the correct code is still rejected.
  3. Server and port. For incoming mail, the IMAP server is imap.gmail.com, port 993, with SSL/TLS. For outgoing mail, the Gmail SMTP server is smtp.gmail.com, port 465 with SSL or 587 with STARTTLS. The username is your full Gmail address.
  4. Revoked code. Go back to "App passwords". If the line has disappeared, generate a new code.
  5. Account password changed. Changing your main password can invalidate existing codes. Create a new one and replace it in each tool.

If nothing changes, delete the code and start again with a fresh one. The code is never shown again.

One code per tool

When you need to manage several addresses, give each code a specific name: "Thunderbird – laptop", "Support tool – contact@". You'll know which one to revoke if there's a problem.

Delete the ones you no longer use on a regular basis.

Drafted with PrismDraft and reviewed before publishing.

All your inboxes. One calm place.

Connect Gmail, Outlook or any IMAP account. Replies always go out from the address that received the mail.

Start free

The free plan includes 2 mailboxes.

Keep reading