8

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]
  • This is a strange error. I see the same behaviour - even though I send definitely *a lot* less than the allowed 20 requests per second. – BlaM Oct 21 '15 at 12:08
  • 1
    Possible duplicate of [Webmaster API v3: getting servingLimitExceeded using batch requests](http://stackoverflow.com/questions/29177221/webmaster-api-v3-getting-servinglimitexceeded-using-batch-requests) – BlaM Oct 21 '15 at 12:11

1 Answers1

4

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

Evan Jones
  • 398
  • 4
  • 11
  • 1
    This seems to be rate limiting but instead of 5xx status like in all other rate limiting cases here Google chose to send 403. This is quite inconsistent! Google's own Backoff methods fail to handle this because they're looking for a 5xx code. –  Feb 07 '14 at 00:53
  • 1
    @user346648: You can reimplement the BackOffRequired interface to make it handle 403s as well: https://developers.google.com/api-client-library/java/google-http-java-client/reference/1.20.0/com/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler.BackOffRequired – DeaconDesperado Mar 18 '16 at 17:57