小编Bor*_*lys的帖子

“作为附加组件测试”模式下出现“302 暂时移动”错误 (Telegram)

  1. 该电子表格包含项目 1,部署为具有以下权限的 Web 应用程序:Execute as: Me, Who has access: Anyone

网络应用程序

function doPost(e) {
  myLog('Received from Addon: ' + JSON.stringify(e));
  // console.log('parameters from caller ' + JSON.stringify(e));
  return ContentService.createTextOutput(JSON.stringify(e));
}
Run Code Online (Sandbox Code Playgroud)

Webhook aTelegram-bot 和此 Web 应用程序已设置。

  1. 我正在使用此电子表格来测试(作为附加组件)另一个项目 2。

添加在

function sendPost() {
  var sheetURL = SpreadsheetApp.getActiveSpreadsheet().getUrl();

  // var webAppUrl = "https://script.google.com/macros/s/#####/exec"; // 7: Part_1 - WebApp: My
  var webAppUrl = "https://script.google.com/macros/s/###/exec"; // 7: Part_1 - WebApp: Tester

  // var auth = ScriptApp.getOAuthToken();
  // var header = { 'Authorization': 'Bearer …
Run Code Online (Sandbox Code Playgroud)

web-applications add-on google-apps-script http-status-code-302 telegram-bot

2
推荐指数
1
解决办法
1797
查看次数