【问题标题】:Does appscript require G-Docs enabled, even for the basic appappscript 是否需要启用 G-Docs,即使对于基本应用程序也是如此
【发布时间】:2014-02-27 02:32:57
【问题描述】:

我试图从已禁用 Google 文档的帐户运行此应用。

function doGet() {
  var app = UiApp.createApplication();

  var button = app.createButton('Click Me');
  app.add(button);

  var label = app.createLabel('The button was clicked.')
                .setId('statusLabel')
                .setVisible(false);
  app.add(label);

  var handler = app.createServerHandler('myClickHandler');
  handler.addCallbackElement(label);
  button.addClickHandler(handler);

  return app;
}

function myClickHandler(e) {
  var app = UiApp.getActiveApplication();

  var label = app.getElementById('statusLabel');
  label.setVisible(true);

  app.close();
  return app;
}

我无法运行此代码,它不需要/使用 Google 文档权限(在 OAuth 屏幕中确认),但我仍然收到一条错误消息:

“很抱歉,您无权访问 Google 电子表格。 请联系您的域管理员以获得访问权限。”

【问题讨论】:

    标签: google-apps-script google-drive-api


    【解决方案1】:

    错误消息有点误导,因为这与电子表格无关。但是您将无法在禁用 Google Drive/Docs 的 Apps 帐户上运行 Apps Script Web 应用程序(作为用户)。 Apps 脚本是 Google Drive 的一部分,禁用它也意味着禁用 Apps 脚本。

    我认为 Apps 脚本团队从未想过他们会在 Google 云端硬盘环境之外有如此多的用途。我想你可以在issue tracker 上提出增强请求,我觉得这是他们会考虑的。请记住描述您为此想到的用例。但不要抱太大希望,这很可能在不久的将来不会改变。

    【讨论】:

      猜你喜欢
      • 2019-09-13
      • 2011-09-12
      • 2010-11-02
      • 1970-01-01
      • 2016-11-27
      • 2011-04-04
      • 1970-01-01
      • 2012-09-08
      • 1970-01-01
      相关资源
      最近更新 更多