title: Authentication issue with Google Apps Script deployed as a web app
body: <p>I am facing HTTP 401 errors while trying to call a deployed Apps Script (as a web app, accessible to "anyone") from a second GAS with UrlFetch and a bearer in authorization header. The scripts were working fine for months until around two weeks ago.
  Here are two small scripts to reproduce the error.</p>
  
  <p><strong>Script A - Deployed as a web app, accessible to "Anyone".</strong></p>
  
  <pre><code>function doGet(e) {
    var params = e.parameter.params;
    console.info("Parameters : " + JSON.stringify(e.parameter));
    return ContentService.createTextOutput("Success");
  }
  </code></pre>
  
  <p><strong>Script B - Calling the script A via UrlFetch</strong></p>
  
  <pre><code>function callURL() {
    var param = {
      method      : "get",
      headers     : {"Authorization": "Bearer " + ScriptApp.getOAuthToken()},
      followRedirects : true,
      muteHttpExceptions:true,
    };
    var url = "https://script.google.com/macros/s/&lt;script_A_deployed_url&gt;/exec?param1=test";
    var resp = UrlFetchApp.fetch(url,param);
    if(resp.getContentText() != "Success"){
      console.info(resp.getContentText());
      throw resp.getContentText();
    }
  }
  </code></pre>