[go-nuts] Send a mail with a service account using Gmail API

2020-07-24 Thread Vincent Jouglard
Hi John, Thanks for your message. The main difference with my implementation is that I use a service account which is authorized to send messages on my behalf...and I think that this is where lies the problem. As i understand OAuth and the implementation from your exemple, a token is generated

[go-nuts] Send a mail with a service account using Gmail API

2020-07-24 Thread Vincent Jouglard
Hi there, I have been trying for quite some time to get over an error while trying to send an email using a service account, via the Gmail API. I get: > googleapi: Error 400: Precondition check failed., failedPrecondition Code is: package gmailApi import ( "encoding/base64" "fmt" "ne