Seeing 400 error while trying to send a mail

I'm trying to send a mail from my App engine application. I've authenticatied to Gmail API using my service account's key file.  The from mail is my service account mail itself

Screenshot 2023-03-24 at 2.45.53 AM.png

Seeing the below error in line no 68 - 

<HttpError 400 when requesting https://gmail.googleapis.com/gmail/v1/users/me/messages/send?alt=json returned "Precondition check failed.". Details: "[{'message': 'Precondition check failed.', 'domain': 'global', 'reason': 'failedPrecondition'}]">

Would like to understand what the Precondition check failed error means and any comments on how to resolve the issue.

0 3 19.3K
3 REPLIES 3
Top Labels in this Space
Top Solution Authors