Apps脚本执行API显示devMode错误:true [英] Apps Script Execution API showing error with devMode: true

查看:69
本文介绍了Apps脚本执行API显示devMode错误:true的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试通过 devMode:true 为我的一个项目使用Execution API,但出现以下错误.但是当我使 devMode:false 时,它可以完美地工作.注意:我是所有者,并且使用同一帐户的API(因此应该可以正常使用)

Trying to use Execution API for one of my project with devMode: true, but getting the following error. But it works flawlessly when I make devMode: false. NOTE: I am owner and using the API from same account (so it should work ideally)

  1. 我已将脚本部署为api可执行文件,访问权限为任何人"
  2. 我已在开发人员控制台中启用了"Apps Script API"
  3. oauth和app脚本都共享同一个项目

{错误": {代码":404,"message":未找到请求的实体.",状态":"NOT_FOUND"}}

推荐答案

我也遇到过同样的情况.那么您可以再次确认以下几点吗?

I had also experienced the same situation. So can you confirm the following points again?

  1. 再次使用保存"按钮保存应用脚本.
  2. 将应用程序脚本另存为新版本.
  3. 是否从使用Apps Script API的项目中检索了客户端ID和客户端机密.
    • 是否从这些客户端ID和客户端机密中检索访问令牌.

再次确认以上内容后,我始终使用以下curl命令进行测试.使用此curl命令时,请输入访问令牌,函数名称和脚本ID.

After I confirmed above again, I always test using a following curl command. When you use this curl command, please input your access token, function name and script ID.

curl -X POST -L \
    -H "Authorization: Bearer ### access token ###" \
    -H "Content-Type: application/json" \
    -d "{function: '### function name ###',devMode: true}" \
    "https://script.googleapis.com/v1/scripts/### script ID ###:run"

在我的环境中,您的问题中的错误已解决.我不知道这些方法是否可以解决您的问题.如果这对您没有用,对不起.

In my environment, the error in your question was solved. I don't know whether these can solve your problem. If this was not useful for you, I'm sorry.

这篇关于Apps脚本执行API显示devMode错误:true的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆