edgar prez
edgar prez

Reputation: 1

Service account on Drive API has reached the storage limit

Is there a way I can remove data from a Service account created for a Project for Drive API since this is hitting the storage limit. Can I transfer the data to another non service account, Or can I substitute this service account for another? so I can keep using my project or shall I create a new project and integrate it with a new Service account?

Possible solutions seem are described on these other questions, but I´m not sure yet about the solution.

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

Can you please help?

Upvotes: 0

Views: 3397

Answers (1)

Teyam
Teyam

Reputation: 8092

As far as I know, Service Accounts currently cannot purchase additional storage so if you want more storage, you'll need to use a regular Google account instead. Aside from that, change of ownership of service account files is also not possible with Google Drive API.

The only possible option that I found, for now, is to transfer the ownership of the service account file to another account via the app script given in SO post - How to use a service account to transfer ownership of a google file.

After transferring of file ownership, to keep using your project, you can grant owner permission to your service account in the drive file that you need to access by sharing the document.

Solution given by Jalogar in SO post - Drive API access to document with service account might really help.

Upvotes: 1

Related Questions