Google App Engine nodejs ap - send email using Application Default Credentials

0 views
Skip to first unread message

Peter Coghill via StackOverflow

unread,
Apr 1, 2016, 5:37:04 AM4/1/16
to google-appengin...@googlegroups.com

Less of a question, more of a plea for help!

I'm struggling to make sense of how to use the Application Default Credentials to access gmail features. I have a simple web app that includes a form that the user can use to enter their name/email to receive an output report of the app by email. Ideally, I want the message to be sent by the application's service account. A simple idea, but I'm really struggling to make find any noob friendly guides/tutorials.

As I understand it is possible to use the Application Default Credentials to use the gmail api to generate messages. This avoids the need to include login/account information in the code, or upload credentials.

I've been trying to follow the guidance here: https://developers.google.com/identity/protocols/application-default-credentials and here: https://github.com/google/google-api-nodejs-client.
But my knowledge fails me, and I need a more complete guide.

I have also tried to follow this guide https://developers.google.com/gmail/api/quickstart/nodejs#prerequisites but it seems to be aimed at using the user account, and I want to authenticate using the app service account.

Has anyone come across or produced a step by step guide somewhere?



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/36352734/google-app-engine-nodejs-ap-send-email-using-application-default-credentials
Reply all
Reply to author
Forward
0 new messages