如何使用范围 "https://www.googleapis.com/auth/script.webapp.deploy"

How to use scope "https://www.googleapis.com/auth/script.webapp.deploy"

当您在 appscript.json 文件的 oauthScopes 部分中添加此范围时:

  "oauthScopes": [
    "https://www.googleapis.com/auth/script.webapp.deploy",
  ]

当您尝试使用插件时,您会看到类似这样的内容:

As I understand, this scope will allow the developer to deploy the addon as a web app (a separated web app for each addon user, not the only web app when we Deploy as web app manually in the script editor)


我的问题是 如何实际使用此范围 "Publish this application as a web app"

我的意思是在代码中它必须是 ScriptApp.deployWebApp(...) 或类似的东西,对吗?

但是我在这里找不到任何东西https://developers.google.com/apps-script/reference/script/script-app

恐怕目前是不可能的。屁股在 ScriptApp.Service class 中看到,您只能禁用脚本的 Web 应用程序,阅读他们的 URL,但创建新的。