See four different API Authentication methods presented in Apps Script, including authentication in query string, headers, and OAuth2.
I got fed up digging around in my Drive folder for old scripts to refresh my memory on the syntax, so I created this reference.
It’s not a comprehensive post on how to connect to APIs, instead, it’s a short summary of common protocols for easy reference.(If you’re new to APIs, start with my Apps Script API tutorial for beginners.)
We are currently spoilt for choice with Google Apps Script community contributions. This is a great post from Ben Collins for Google Apps Script beginners highlighting different patterns used to interact with third party websites with APIs.
An API is essentially an interface that can be used by a computer programme to retrieve or interact with another application.