【发布时间】:2021-09-26 10:09:59
【问题描述】:
我在 google 脚本中用这个函数设置了 webHook
function setWebhook() {
var url = telegramUrl + "/setWebhook?url=" + webAppUrl;
var response = UrlFetchApp.fetch(url);
}
其中电报 url 包含电报令牌,web AppUrl 是 google script exec url。 当我尝试使用功能获取 webhook 信息时
function getWebhookinfo() {
var url = telegramUrl + "/getWebhookInfo";
var response = UrlFetchApp.fetch(url);
Logger.log(response.getContentText());
}
我收到此错误消息:
[20-12-22 10:41:23:115 CET] {"ok":true,"result":{"url":"https://script.google.com/macros/s/___________________________/exec","has_custom_certificate":false,"pending_update_count":0,"last_error_date":1608570964,"last_error_message":"Wrong response from the webhook: 401 Unauthorized","max_connections":40,"ip_address":"172.217.17.78"}}
【问题讨论】:
标签: bots telegram unauthorized