2016-05-14 44 views
0

有沒有一種方法可以從爲Drive API創建的服務帳戶中刪除數據,因爲這將達到存儲限制。我可以將數據傳輸到另一個非服務帳戶嗎?或者我可以用這個服務帳戶替代另一個嗎?所以我可以繼續使用我的項目,還是應該創建一個新項目並將其與新的服務帳戶相集成?Drive API上的服務帳戶已達到存儲限制

可能的解決方案似乎在這些其他問題上進行了描述,但我還不確定解決方案。

Google Drive Service Accounts Additional Storage

Quota, orphaned files and uploads using service account with Google Drive API

Google Drive API ownership of files uploaded from service account

Google APPs managed "unlimited" account storage quota for service account

能否請你幫忙嗎?

回答

0

據我所知,服務帳戶目前無法購買額外的存儲空間,所以如果您需要更多的存儲空間,您需要改用普通的Google帳戶。除此之外,使用Google Drive API也無法更改服務帳戶文件的所有權。

我現在發現的唯一可能的選擇是通過SO post-How to use a service account to transfer ownership of a google file中給出的應用程序腳本將服務帳戶文件的所有權轉移到另一個帳戶。

傳輸文件所有權後,爲了繼續使用您的項目,您可以將所有者權限授予您需要通過共享文檔訪問的驅動器文件中的服務帳戶。

Jalogar在SO中給出的解決方案 - Drive API access to document with service account可能真的有所幫助。

相關問題