【问题标题】:How to share files using drive-sdk?如何使用 drive-sdk 共享文件?
【发布时间】:2014-07-17 12:05:53
【问题描述】:

我想知道如何使用 drive-sdk 和 python 与用户共享文件。我一直在使用下面的代码,但它不会与指定用户共享文件,也不会产生错误:

...

Permission = {
  'value': 'user@example.com',
  'type' : 'user',
  'role' : 'reader'
}

drive.permissions().insert(fileId=file['id'], body = Permission,sendNotificationEmails = True )

【问题讨论】:

    标签: python google-app-engine google-drive-api


    【解决方案1】:

    原因是你执行失败。应该是

    drive.permissions().insert(fileId=file['id'], body=Permission, sendNotificationEmails=True ).execute()
    

    【讨论】:

      猜你喜欢
      • 2013-06-03
      • 1970-01-01
      • 1970-01-01
      • 2016-07-11
      • 1970-01-01
      • 2012-09-10
      • 2012-09-05
      • 2021-12-29
      • 1970-01-01
      相关资源
      最近更新 更多