【发布时间】:2021-02-10 10:12:01
【问题描述】:
我有一个可用的 Google 幻灯片 2020 版,我将它复制到了 2021 版。 但现在我得到了错误
Exception: Action not allowed
refreshSlides @ Code.gs:9
脚本是:
function refreshSlides(){
var currentPresentation, i, linkedSlide, numSlides
// loop through all slides and refresh them
currentPresentation = SlidesApp.getActivePresentation();
numSlides = currentPresentation.getSlides().length;
for (i = 0; i < numSlides; i++) {
linkedSlide = currentPresentation.getSlides()[i]
linkedSlide.refreshSlide();
Utilities.sleep(5000);
}
}
我尝试通过向 appsscript.json 添加(见下文)来添加授权
"oauthScopes": [
"https://www.googleapis.com/auth/presentations.currentonly",
"https://www.googleapis.com/auth/presentations"
],
但这并没有帮助。 我在这里错过了什么??
【问题讨论】:
标签: google-apps-script google-slides-api