问题
Hello Google Tasks API team,
Since a couple of days ago we've started getting "403 Forbidden"
for many of our users.
Can you please check what is going on? Our API console is clean, #calls are way bellow quotas.
Caused by: com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
"code" : 403,
"errors" : [ {
"domain" : "global",
"message" : "Serving Limit Exceeded",
"reason" : "serviceLimit"
} ],
"message" : "Serving Limit Exceeded"
}
at com.google.api.client.googleapis.json.GoogleJsonResponseException.from(GoogleJsonResponseException.java:145) ~[google-api-client-1.15.0-rc.jar:1.15.0-rc]
at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:111) ~[google-api-client-1.15.0-rc.jar:1.15.0-rc]
at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:38) ~[google-api-client-1.15.0-rc.jar:1.15.0-rc]
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest$1.interceptResponse(AbstractGoogleClientRequest.java:312) ~[google-api-client-1.15.0-rc.jar:1.15.0-rc]
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1042) ~[google-http-client-1.15.0-rc.jar:na]
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:410) ~[google-api-client-1.15.0-rc.jar:1.15.0-rc]
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:343) ~[google-api-client-1.15.0-rc.jar:1.15.0-rc]
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:460) ~[google-api-client-1.15.0-rc.jar:1.15.0-rc]
回答1:
If this API is anything like the Google Directory API, this could mean you are hitting a "per user" rate limit. E.g. the directory API defaults to 15 requests per second per user, then returns this same 403 error. To fix this, change the quota in the Google API console, or make fewer requests per second. See:
API console: https://code.google.com/apis/console/
Documentation about quotas: https://developers.google.com/console/help/#cappingusage
来源:https://stackoverflow.com/questions/19425384/google-tasks-api-403-forbidden-serving-limit-exceeded