Using the OAuth open source library

If your application interacts with external libraries other than Google's basic services, then it should be authenticated. In other words, if your application runs on behalf of a user, then that user should authorize your application to grant access to his/her data. GAS does not provide any built-in authentication service, but you can use an open source OAuth library.

Get Learning Google Apps Script now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.