问题描述
我想从Android应用程序中访问谷歌的翻译服务。然而,每次我尝试访问服务(使用 HTTPGET
要求),我遇到以下错误:
I am trying to access Google's Translate services from within an Android app. However, each time I try to access the service (using an HttpGet
request), I encounter the following error:
{
"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.在谷歌开发者控制台,创建一个新的项目。结果
2.从左侧的API和验证部分,激活翻译API第2版。结果
3.生成与debug.keystore和对开发者控制台SHA1密钥,生成与该信息的新钥匙。结果
4.添加了结算信息。信用卡已被接受。结果
5.用下面的链接访问翻译API:结果
<$c$c>https://www.googleapis.com/language/translate/v2?key=myKey&source=en&target=hi&q=hell
每个应用程序运行上述Get请求时,将返回403错误。我一直在通过所有的SO或谷歌能照顾到扔了在这个问题上并没有什么似乎已经影响到它的链接。
Each time the app runs the above Get Request, the 403 error is returned. I have been through all the links that SO or Google can care to throw up on this issue and nothing seems to have affected it.
任何想法,我可能会错误?
Any ideas where I might be going wrong?
推荐答案
如果你使用URI的宁静,你可以试试浏览器的关键!
If you use Restful URI, You can try Browser Key!
这篇关于错误403与谷歌翻译版API访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!