小编Haq*_*waz的帖子

您无权调用“UrlFetchApp.fetch”

我正在从谷歌电子表格中的脚本编辑器发送 http 请求,但我不断收到以下错误消息:

`Google Apps Script: You do not have permission to call UrlFetchApp.fetch. Required permissions: https://www.googleapis.com/auth/script.external_request`
Run Code Online (Sandbox Code Playgroud)

我正在使用 onEdit 功能:

 function onEdit(e){
  var ui = SpreadsheetApp.getUi();
        var response = UrlFetchApp.fetch('http://www.eur-api.idomoo.com/');
    Logger.log(response.getContentText());
  } 
Run Code Online (Sandbox Code Playgroud)

我不知道为什么我会收到这个错误?我还授予了 script.external_request 范围的权限,任何帮助将不胜感激。

google-sheets google-apps-script

16
推荐指数
3
解决办法
5544
查看次数

标签 统计

google-apps-script ×1

google-sheets ×1