无法通过REST API调用App Script函数

时间:2019-12-25 13:05:10

标签: java google-apps-script http-status-code-404 google-apps-script-api

我正在使用Java API调用电子表格上的AppScript函数 当我列出部署

List<Deployment> deployments = projects.deployments().list("XXX").execute().getDeployments();

我可以看到我的部署,但是Deployment.getFunctionSet()为NULL 所以当我打电话

Operation op = service.scripts().run(
            "XXX",
            new ExecutionRequest().setDevMode(true).setFunction("exportJson")
).execute();

我知道

{
  "code" : 404,
  "errors" : [ {
    "domain" : "global",
    "message" : "Requested entity was not found.",
    "reason" : "notFound"
  } ],
  "message" : "Requested entity was not found.",
  "status" : "NOT_FOUND"
}

问题-如何从Google App脚本调用函数? )

0 个答案:

没有答案