Google App Scripts cannot be given Authorization or Permission

霸气de小男生 提交于 2019-11-27 09:37:12
Serge insas

Click on the "Advanced" link and you'll be able to authorize your script.

Image from Codelabs(Google)

To reduce the scope of permissions you request, you also have the option of declaring your script project to be only able to interact with the bound document:

/* @OnlyCurrentDoc */
function myFunction() {
  ...

This declaration is incompatible with some methods (such as SpreadsheetApp.openById()), and using an incompatible method results in an error in the application execution.

Successfully adding it to your project is generally sufficient to remove the "This application is unsafe" layer of the authentication flow, meaning the authorization and permission list is not hidden behind the "Advanced" tab.

In addition to declaring as current document only, manually editing the requested scopes of your project in its project manifest can help reduce the perceived threat from an unverified application (for example, retaining only the "read_only" version of certain scopes, where applicable). Apps Script documentation offers more details on project manifests.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!