Reputation: 6144
tl;dr: I'm getting Quota Error: You have exceeded the maximum number of writes/day for this project
even tho I have 50k queries / day as the quota limit.
I have a project on google cloud consle with GA API enabled:
Oddly enough, in the GA Quotas view I see two anonymous Query sections, both with 50k queries / day: (deleted the graphs to capture both quotas on same screen)
A side question here, why do I have two Query sections? what does each mean?
I have a service account with access to this project:
with a generated JSON key:
and I'm using that service account to make API requests:
const path = require('path')
const { google } = require('googleapis')
module.exports = createApiInstance
const keyFilePath = path.resolve(__dirname, '../../credentials.json')
const auth = new google.auth.GoogleAuth({
keyFile: keyFilePath,
scopes: ['https://www.googleapis.com/auth/analytics.edit'],
})
auth.getClient().then(client => {
client.request(params)
})
I can get away with just a few requests in a day before I run into the quota limit error.
One weird thing is that even tho I just made some requests a few minutes ago, the service account's logs come up empty:
Which would be tempting to say the service account isn't being used, but, if that was the case how would I be able to get away with the few requests that do actually pass?
I'm not using any Auth'ing other than the service account generated credentials file 🤷♀️
As an aside, we are using the same service account with the same credentials file on another project for a different google API, and it works as expected.
any ideas what's going on here?
Upvotes: 2
Views: 467
Reputation: 116958
First off do not go by what you are seeing in the google developer console.
If the error message says you are going over the limit you are going over the limit. Just apply for an extension. This is one of the easer apis to get an extension on.
Limits and Quotas on API Requests
You have to go over to https://console.cloud.google.com/ to see what your writes per day are
Upvotes: 2