Google Translate API always returning 'Daily Limit Exceeded'

一曲冷凌霜 提交于 2019-12-30 03:00:14

问题


I'm trying to get the google translate API up and running. On the getting started guide, it gives the following example: https://www.googleapis.com/language/translate/v2/detect?key={MyAppId}&q=google+translate+is+fast

I just want to get this working for now, so I'm just trying to get it working view via a browser post, so I created a testing web application (screenshot):

and grabbed the API key, replaced the sample URL's key with my API key. I get the following response:

{
 "error": {
  "errors": [
   {
    "domain": "usageLimits",
    "reason": "dailyLimitExceeded",
    "message": "Daily Limit Exceeded"
   }
  ],
  "code": 403,
  "message": "Daily Limit Exceeded"
 }
}

I should also note, that I have signed my account up with the billing option (I plan on using the service quite a bit), so I should have no issues at the moment.

I'm obviously doing something wrong, but I don't know what. Any suggestions?


回答1:


For getting data translated you have to enable billing and have to register your credit/debit card.After you register your card 1$ will be deducted and then you will be able to use your URL

I did it recently and it worked fine.

I am also working on translating project nowadays.

Let me know if you need any kind of help on this topic

Ishan




回答2:


I would first confirm that the Translate API is enabled under the "APIs" link in the Cloud Console - if it is not enabled, that effectively sets the quota to zero and may produce a similar message.

If the API is enabled, then the following link describes how to check the usage limits for your project: https://developers.google.com/translate/v2/pricing




回答3:


You can change the quotas manually:




回答4:


to complement @Ishan Arora, after you add the credit card info, go to the console, enter into the project, a message will popup asking to setup the billing account for your project, if you want to get ride of the error, just select "set project into the billing account" drop down list.




回答5:


On my case, the same problem was caused by credit card expiration



来源:https://stackoverflow.com/questions/20048735/google-translate-api-always-returning-daily-limit-exceeded

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!