Google Drive API ownership of files uploaded from service account

后端 未结 1 1180
别跟我提以往
别跟我提以往 2021-01-06 04:00

We are using a service account to upload files from a server and it has reached its storage quota limit. All files had been added under a folder created by another user (a @

相关标签:
1条回答
  • 2021-01-06 04:25

    To transfer the ownership of the file, you can rely on the "insert" method from the Permissions resource. You will need the fileId as a required parameter, and fill out the request body with the properties for: Role: [owner], Type: [user], and either one of these id:[userId within drive] or value:[email from the Drive account]. You can find more information in this link: https://developers.google.com/drive/v2/reference/permissions/insert

    0 讨论(0)
提交回复
热议问题