How to use scope “https://www.googleapis.com/auth/

2019-08-31 05:25发布

问题:

When you add this scope inside oauthScopes section in your appscript.json file:

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

you will see something like this when you attempt to use the addon:

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)


My question is how to actually use this scope to "Publish this application as a web app" ?

I mean in code it must be ScriptApp.deployWebApp(...) or something like that, right?

But I can't find anything here https://developers.google.com/apps-script/reference/script/script-app

回答1:

I am afraid it currenty is not possible. Ass see in ScriptApp.Service class, you can only disable Web app for script, read their URL, but create new one.