Using AuthToken obtained via ScriptApp.getAuthToken() to call web apps in GAS
问题 I created 2 simple standalone scripts to test the authorization workflow. The first script is a web app that is accessible only to me. function doGet(e) { return ContentService.createTextOutput(JSON.stringify({"message":"works!"})) .setMimeType(ContentService.MimeType.JSON); } The calling script gets the token via ScriptApp.getAuthToken() and makes a 'GET' request to the web app. function call() { var token = ScriptApp.getOAuthToken(); var header = {"Authorization":"Bearer " + token}; var