Ani
Ani

Reputation: 1457

Are service accounts considered as users in Google Sheets API v4 usage limits?

According to the Google Sheets documentation there are Usage Limits applicable:

I want to access a spreadsheet from an App Engine app using the Sheets API, but I wonder how the usage limits are applied to service-accounts.

  1. In Cloud Console IAM of the corresponding project, a service-account is created for the app.
  2. The Google spreadsheet is shared with the email address of the service-account (with edit permission).
  3. Code in the app uses service-account from JSON file to authenticate successfully to the Sheets API. No user delegation included.
  4. App can successfully write to the spreadsheet with the service-account credentials.

Since these requests are done only with service-account credentials and with no user credentials, I wonder if a service-account in this context is considered as a "user" or just as the project (of the app).

Question: Is the per user limit applicable, i.e. app would be limited to 100 write requests per 100 seconds. Or are these requests only counted against the per project limit, i.e. app could issue up to 500 write requests per 100 seconds?

Upvotes: 2

Views: 1148

Answers (1)

Linda Lawton - DaImTo
Linda Lawton - DaImTo

Reputation: 117166

A service account is a user it has its own Google drive account actually. You shared the sheet with its email address like you would with any other user.

Using a service account is exactly like running as a normal user account the same quota limitations apply.

There is a parameter called quota user which can be used to extend the quote but it doesn't work perfectly from behind the same ip address

Upvotes: 5

Related Questions