This is a demonstration of how you can have Google Apps Script connect to an external API that would accept a token generated by Auth0. This requires an Auth0 account as well as an API that will authorize requests that include an Auth0 token. This is using the Machine-to-Machine Auth0 method. Not exclusive to Auth0, this code can be adopted to be used with Firebase or a custom authentication server. It is only an example of using and refreshing tokens.
There are better ways of doing this, but in a pinch this has worked as a stable solution for me. This is unsafe for production use. In production I would use the gmail account used to log into the google app as the only way to authenticate with your API. That would add a bit more work in managing users and auth methods while this is a very general auth script.
It would be wise to make use of Google PropertiesService which enables you to store values by document or by user. There are many different ways to store properties and I would explore them all before deciding what is best practice for you. Exploring Apps Script Documentation will shed light on new ideas.
I have API functions triggered on an interval of every X minutes, but you can also setup a menu item that triggers a POST manually using SpreadsheetApp.getUi().createMenu
There are lots of ways you can make a Google Sheet look and function like a web based application. It can be an easy way of drafting up a mock before going into full development of a single page application. Using sidebars and dialogues with HTML/CSS further expands on what you can do. Apps Script is almost exactly the same as Javscript.