Skip to content

Instantly share code, notes, and snippets.

View cmundi's full-sized avatar

C. Mundi cmundi

  • someplace quiet
View GitHub Profile
@cmundi
cmundi / app.js
Last active August 10, 2019 20:13
Google API Service Account Demo for Gmail and Drive
//
// Using Google Drive and Google Mail with a Service Account.
//
// Amswer to http://stackoverflow.com/questions/37902022/gmail-api-with-nodejs-send-gives-400-bad-request?answertab=active#tab-top
//
// A service account is pretty much like a normal Google account, except that yo can't get get a "shell" like
// the Gmail webapp or Drive webapp into it. To manage email with a Service Account, the administrator for the
// domain which owns the email addresses must enable API access for the Service Account. That's described in my
// SO post and the links therein. Assuming you've set all that up, it's time to have some fun!
//