Gmail API messages.list returning FAILED_PRECONDITION

Hello,

We are experiencing a growing number of FAILED_PRECONDITION errors from the Gmail API on the messages.list operations. This is affecting a significant amount of our users and we need help identifying the root cause.

Endpoint:

GET https://gmail.googleapis.com/gmail/v1/users/me/messages

Error response:

{
  "code": 400,
  "message": "Precondition check failed.",
  "errors": [
    {
      "message": "Precondition check failed.",
      "domain": "global",
      "reason": "failedPrecondition"
    }
  ],
  "status": "FAILED_PRECONDITION"
}

Additional details:

  • We are using user OAuth credentials with 'me' as the user identifier
  • OAuth scopes is correct (gmail.readonly)
  • This affect only a portion of the users

Is there a way to get more diagnostic detail beyond the generic Precondition check failed message?
Has anyone else faced the same problem?

Thanks you

1 Like