Код: Выделить всё
Exception: Request failed for https://api.line.me returned code 400. Truncated server response: {"message":"richmenu not found","details":[]} (use muteHttpExceptions option to examine full response)
createRichMenuAlias @ setupRichMenu.gs:140
setupRichMenu @ setupRichMenu.gs:12
function createRichMenuAlias(richMenuId, aliasId) {
let url = "https://api.line.me/v2/bot/richmenu/alias";
let aliasData = {
richMenuAliasId: aliasId,
richMenuId: richMenuId
};
let options = {
"method": "post",
"headers": { "Authorization": `Bearer ${CHANNEL_ACCESS_TOKEN}`, "Content-Type": "application/json" },
"payload": JSON.stringify(aliasData)
};
let response = UrlFetchApp.fetch(url, options);
console.log(`Alias ${aliasId} created for Rich Menu ID: ${richMenuId}`);
console.log(response.getContentText()); // 輸出目前所有的 Alias
}
< /code>
Я бы очень признателен за любые понимания того, что может вызвать эту проблему и как я могу ее исправить. Спасибо заранее!
Подробнее здесь: https://stackoverflow.com/questions/794 ... -rich-menu
Мобильная версия