UrlFetchApp.fetch错误

时间:2017-02-04 21:04:01

标签: google-apps-script

我收到错误

“成功”:假,   “错误”:“您需要获得授权才能提出此请求。”,

以下是我编写的代码

function post_phone() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var ph = ss.getRange('E5').getValue();

var url = 'http://someurl/processdata.php';

 var payload =
      { 
     phone : ph

   };


var options =
 {
 "method": 'POST',
 "payload": payload
 };

  var response = UrlFetchApp.fetch(url, options);

  Logger.log(response);


}

0 个答案:

没有答案