我正在尝试运行下面给出的代码,其中“myApp”是脚本中的函数名称,我试图运行该代码 .

ExecutionRequest request = new ExecutionRequest().setFunction("myApp").setDevMode(true);
try {
    Operation op = service.scripts().run("some id", request).execute();
    // Print results of request.
    if (op.getError() != null) {
        // The API executed, but the script returned an error.
        System.out.println("Error");
    } else {
        System.out.println("Success");
    }
} catch (GoogleJsonResponseException e) {
    e.printStackTrace(System.out);
}

它给我的错误如下:

{“code”:404,“errors”:[{“domain”:“global”,“message”:“找不到请求的实体 . ”,“reason”:“notFound”}],“message”:“找不到请求的实体 . “,”status“:”NOT_FOUND“}

或者,如果我将其部署为Web应用程序,则会出现此类错误:

com.google.api.client.googleapis.json.GoogleJsonResponseException:403 Forbidden {“code”:403,“errors”:[{“domain”:“global”,“message”:“来电者没有权限” ,“reason”:“forbidden”}],“message”:“来电者没有权限”,“状态”:“PERMISSION_DENIED”}

我要做的就是完美地运行代码????