【问题标题】:Google Apps Script - Run script as a another user (with password)Google Apps 脚本 - 以其他用户身份运行脚本(使用密码)
【发布时间】:2015-01-17 01:25:53
【问题描述】:

我有一个将文件所有权转移给另一个用户的脚本,当运行脚本的用户是要转移的文件的所有者时,此方法有效。

setOwner(emailAddress)

是否可以在不必以文件所有者身份登录来运行脚本的情况下完成此操作?我有所有者的电子邮件和密码。

【问题讨论】:

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


    【解决方案1】:

    没有那么简单,您必须 get access with oauth2 并使用 Drive API 到 update the permissions

    从未使用过 oauth2/Drive API,因此无法提供任何示例。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-06-09
      • 2023-01-12
      • 1970-01-01
      相关资源
      最近更新 更多