Open kiquenet opened 6 years ago
Linda Lawton says:
Service accounts will only work with Gsuite email accounts. The admin of the Gsuite (domain) account will have to grant the service account access to the users email account. Unfortunately i don't have access to a Gsuite account so cant help you set it up. This might help Perform G Suite Domain-Wide Delegation of Authority
If this is a normal Gmail user account you are trying to access then you cant use a service account. You will either have to go though the SMTP / IMAP servers or using Oauth2 to authenticate the user.
Then, any full sample step-by-step using Oauth2 to authenticate the user?
I have this code, using Service Account:
`
I use your AuthenticateServiceAccount class for samples.
I get the error:
The same error for
Any suggestions?