Gmail APIGoogle Workspace

FAILED_PRECONDITION — Mail service not enabled

Your mailbox is misconfigured

The Gmail API returns HTTP 400 FAILED_PRECONDITION with "Mail service not enabled" when the account exists and the OAuth token is valid, but no Gmail service is attached to that user. The mailbox cannot send at all until an admin assigns a licence or re-enables Gmail for the organizational unit.

What the server actually says

http_400 | FAILED_PRECONDITION | Mail service not enabled | Precondition check failed.

What you see

Authentication succeeds, the mailbox connects, and then every single send fails. Because it is a 400 rather than a 401 or 403, naive handlers file it as "unknown" and retry it forever.

Why it happens

How to fix it

  1. Check the user actually has a Gmail licence. Google Admin to Directory to Users to the user to Licences. A Cloud Identity-only user has no mailbox and never will until a Workspace SKU is assigned.
  2. Check Gmail is on for the OU. Admin to Apps to Google Workspace to Gmail to Service status. A parent OU with Gmail off overrides the user.
  3. Verify the subscription is current. An expired or suspended subscription disables mail delivery org-wide while leaving accounts and tokens intact.
  4. Stop the mailbox until it is licensed. There is nothing to wait for. The API rejected the call, so no message was created, no message-id exists, and no mailer-daemon will ever reply.

What not to do

Frequently asked questions

Why is this a 400 and not a 403?

Google distinguishes "you are not allowed" (403) from "the preconditions for this call are not met" (400 FAILED_PRECONDITION). The token is fine; the account simply has no mail service to act on.

Will it fix itself?

No. It needs an admin to assign a licence or re-enable the service. No amount of retrying changes the account state.

Does the OAuth token need reconnecting after the licence is restored?

Usually not - the token was never invalid. Once Gmail is enabled for the user, the same credential starts working again.

How MailPilot helps

MailPilot classifies this error automatically on every connected mailbox and tells you which side is at fault, so a throttle is never mistaken for a dead recipient and a credential failure never suppresses a healthy address. It also monitors real inbox placement and checks SPF, DKIM and DMARC on every mailbox, which is where most policy rejections start.

Related errors

Last reviewed 2026-10-11 by the MailPilot team.

Start for free - no credit card required.

Get started freeBook a demo