【发布时间】:2014-01-31 06:34:55
【问题描述】:
我正在尝试从 Android 应用中访问 Google 的翻译服务。但是,每次我尝试访问服务(使用HttpGet 请求)时,都会遇到以下错误:
{
"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."
}
}
我无法解决上述错误。我已将项目设置如下:
1. 在 Google Developer's Console 上,创建一个新项目。
2. 从左侧的“APIs and Auth”部分,激活 Translate API v2。
3. 使用 debug.keystore 生成 SHA1 密钥,并在开发者控制台上使用此信息生成新密钥。
4. 增加计费信息。信用卡已被接受。
5. 使用以下链接访问翻译API:https://www.googleapis.com/language/translate/v2?key=myKey&source=en&target=hi&q=hell
应用每次运行上述Get Request,都会返回403错误。我已经浏览了 SO 或 Google 在这个问题上可能会提出的所有链接,但似乎没有任何影响。
有什么想法我可能会出错吗?
【问题讨论】:
-
不确定,但
debug.keystore可能是错误的。您通常希望使用发布密钥进行设置,因为这是您发布的应用程序用来进行身份验证的密钥。 -
@Sriram 你能解决这个问题吗?
-
@AhmedZ.:不。不走运。
-
@Sriram Ohhhh 非常大...
标签: android api google-translate