title: How to pass parameters from one Google-Apps-Script to another and execute?
body: <ul>
  <li>Goal is to pass data from Google Apps Script A to Google Apps Script
  B. </li>
  <li>Script A is published with execute as user permissions.</li>
  <li>Script B    is published with execute as me permissions (owner).</li>
  </ul>
  
  <p>At the very least I want to be able to pass <code>Session.getActiveUser.getEmail()</code> from script A to script B.</p>
  
  <p>This is what I have so far...</p>
  
  <h3>Script A</h3>
  
  <pre><code>// Script-as-app template.
  function doGet() {
    var app = UiApp.createApplication();
  
    var button = app.createButton('Click Me');
    app.add(button);
  
    var handler = app.createServerHandler('myClickHandler');
    button.addClickHandler(handler);
  
    return app;
  }
  
  function myClickHandler(e) {  
    var url = "https://script.google.com/macros/s/AKfycbzSD3eh_SDnbA4a7VCkctHoMGK8d94SAPV2IURR3pK7_MwLXIb4/exec";
    var payload = { 
      name : "Gene",
      activeUser : Session.getActiveUser().getEmail(),
      time : new Date()
    };
  
    var params = { 
      method : "post",
      payload : payload
    }
    Logger.log("Hello World!");
  
    var HTTPResponse;
  
    try{
      HTTPResponse = UrlFetchApp.fetch(url, params);
    }catch(e){
      Logger.log(e);
    }
    return HTTPResponse;
  }
  </code></pre>
  
  <h3>Script B</h3>
  
  <pre><code>function doPost(e){
    if(typeof e === 'undefined')
      return;
  
    var app = UiApp.createApplication();
    var panel = app.add(app.createVerticalPanel());
    for(var i in e.parameter){
      panel.add(app.createLabel(i + ' : ' + e.parameter[i]));
      Logger.log(i + ' : ' + e.parameter[i]); 
    }
  
    ScriptProperties.setProperty('Donkey', 'Kong');
  
    return app;
  }
  </code></pre>
  
  <h3>output</h3>
  
  <p>Going to script A <a href="https://script.google.com/macros/s/AKfycby-bOfmG8TFHG9963ZRJCX5nOuYfbgA3UfAXqoAqKXRknue-y0/exec" rel="nofollow">here</a> the page loads the button. Clicking the button causes "Hello World!" to be logged in Script A's project log but the log of Script B's project remains empty.
  TryCatch does not log any error.</p>