I would like to send email via Gmail using a service account API. I am able to do this with a Client ID and Client Secret, but a service account doesn't have a client secret. Here's what I do have:
{
"type": "service_account",
"project_id": "my-project-id",
"private_key_id": "107...",
"private_key": "-----BEGIN PRIVATE KEY-----\nMII...=\n-----END PRIVATE KEY-----\n",
"client_email": "something@something.iam.gserviceaccount.com",
"client_id": "103...",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://accounts.google.com/o/oauth2/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/something%40something.iam.gserviceaccount.com"
}
How can I use this information to connect and send an email? All the documentation seems to reference non-service accounts.