refreshSlides 异常:不允许操作

refreshSlides Exception: Action not allowed

我有一个可用的 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"
  ],

但这并没有帮助。 我在这里错过了什么??

official documentation 中所述,refreshSlide() 会报错:

If read-access to the source presentation is no longer available.

确保您拥有当前演示文稿和每张幻灯片的读取权限。

已解决,有一张幻灯片是 'linked slide' 链接的幻灯片未经授权。