目标c-在iOS应用程序中集成谷歌翻译API



我正试图在iOS应用程序中使用Google Translate进行简单翻译,但当我调用url时,我收到了以下错误响应…

{
 "error": {
  "errors": [
   {
    "domain": "usageLimits",
    "reason": "accessNotConfigured",
    "message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
   }
  ],
  "code": 403,
  "message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
 }
}

我找不到任何接近这个问题的解决方案。。这里有人能帮忙吗。提前感谢…

经过一些详细的搜索和RnD,我发现Google Translate APIiOS中不适用于Bundle Identifier。。人们已经在谷歌论坛上将其作为bug提交。。因此,任何试图解决这个问题的人都可以停止努力,直到问题得到解决。。

您需要为Google Translate API设置ON

阅读"入门"链接设置的第三步。

在左侧边栏中,选择API&授权。在API列表中,确保Google Translate API的状态为ON。

并且确保必须启用计费?

重要提示:Google Translate API v2需要所有帐户的账单信息,然后才能开始使用该服务。

还必须以正确的方式设置API密钥?

因为捆绑包id对于Key是可选的。因此,您可以逃避添加捆绑包id并在上启用计费。这将起作用。试着告诉我。

当您没有在谷歌云帐户中添加信用卡详细信息时,就会出现此错误,因为如果您使用谷歌翻译api,则需要添加信用卡细节的规则已经改变。

最新更新