问题描述
我有一个从Google表单创建的Google App脚本.我已将其发布为API可执行文件,并且在过去几周内效果很好.
I have a Google App Script I created from a Google Form. I have it published as an API executable and it's worked fine for the past few weeks.
突然,我无法从Google App脚本调用任何函数.它只返回不允许动作".奇怪的是,我仍然可以通过执行API通过我的Web应用程序正常调用这些函数.
Suddenly, I can't call any functions from Google App Script. It just returns "Action not allowed." Strangely, I can still call the functions normally through my web app via the execution API.
在Dashboard API管理器中,我什至尝试不加限制地使用API密钥,添加了https//www.script.google.com和其他一些奇怪的东西.
In the Dashboard API manager, I even tried unrestricting the API key, adding https//www.script.google.com and some other weird stuff.
这是生产中的,我真的需要修复它.
This is in production and I really need it fixed.
谢谢.
推荐答案
我找到了解决方案.
引起猜测:问题的原因(我的猜测)是我共享了包含表单"(创建脚本的文件夹)的文件夹,并且表单响应的电子表格与任何人"在具有链接的位置可以进行编辑",并且某处的权限变得很棘手.
Cause guess: The cause of the problem (my guess) is that I shared the folder containing the Form (which the script is created from) and the spreadsheet the form responses go to with "Anyone at with link can edit", and somewhere permissions got screwy.
修正:我最终要做的是从Google API仪表板创建一个临时项目,获得了该项目编号,并重新关联了 script 该临时项目(通过资源>开发者控制台项目).然后保存.然后返回并再次将该脚本与原始项目关联,然后我得到一个安全权限弹出窗口以允许访问.否则没有出现.
Fix: What I ended up doing was creating a temporary project from the Google API dashboard, got that project number, reassociated the script with that temporary project (through Resources > Developers Console Project). Then saved. Then went back and associated the script with the original project again, and I got a security permissions popup to allow access. It didn't appear otherwise.
希望这对某人有帮助.
这篇关于“不允许采取行动";-即使是空功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!