Service account impersonation for Google APIS with Nodejs client

113 views
Skip to first unread message

Bruce Mcpherson

unread,
Aug 9, 2019, 11:55:58 AM8/9/19
to Google Apps Script Community
If you want to use Google APIS from server side nodejs, authentication can be complicated for services such as sheets, especially for automated processes that don't have human interaction. 
I noticed that the examples in the api docs are mainly pythonesque and feature 3 legged auth, so here's how to impersonate a domain member using a service account minus the complicated Oauth2 dance. This example uses the Sheets API but most other APIS will work the same way.

http://ramblings.mcpher.com/Home/excelquirks/vuejs-and-apollo-graphql/google-cloud-platform/sheesapiimpersonate

Clay Smith

unread,
Aug 9, 2019, 12:16:36 PM8/9/19
to google-apps-sc...@googlegroups.com
Bruce, 
I was just working through these issues. Thanks for posting on this. I'm going to try this method for something I'm working on. 
Clay

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/71869e36-c539-4944-946b-4948766d8da8%40googlegroups.com.


--

Bruce Mcpherson

unread,
Aug 9, 2019, 12:24:06 PM8/9/19
to google-apps-sc...@googlegroups.com
Sure. Let me know if you need any help. 

Reply all
Reply to author
Forward
0 new messages