Random (403) User Rate Limit Exceeded

David Rojo picture David Rojo · Feb 22, 2015 · Viewed 21.1k times · Source

I am using translate API to translate some texts in my page, those texts are large html formated texts, so I had to develop a function that splits these texts into smaller pieces less than 4500 characters (including html tags) to avoid the limit of 5000 characters per request, also I had to modify the Google PHP API to allow send requests via POST.

I have enabled the paid version of the api in Goole Developers Console, and changed the total quota to 50M of characters per day and 500 requests/second/urser.

Now I am translating the whole database of texts with a script, it works fine but at some random points I revive the error "(403) User Rate Limit Exceeded", and I have to wait some minutes to re-run the script because when reached the error the api is returning the same error over and over until I wait some time.

I don't know why it keeps returning the error if I don't pass the number of requests, it's like it has some kind of maximum chaaracters per each interval of time or something...

Answer

Mohab picture Mohab · Apr 1, 2015

You probably exceed the quota limits you set before: this is either the daily billable or the limit on the request characters per second.

To change the usage limits or request an increase to your quota, do the following: 1. Go to the Google Developers Console "https://console.developers.google.com/". 2. Select a project. 3. On the left sidebar, expand APIs & auth. 4. Click APIs. 5. Click the name of an activated API you're interested in "i.e. The Translate API". 6. Near the top of the info page for the API, click Quota.

  • If you have the billing enabled, just click Quota and it will take you to the quota page where you can view and change the quota-related settings.

  • If not, clicking Quota shows information about any free quota and limits that apply to the Translate API.