【发布时间】:2018-11-07 20:51:27
【问题描述】:
我是使用 Google api 最近道路拍摄道路的新手。
我正在尝试如下链接:
如果我必须尝试
https://roads.googleapis.com/v1/nearestRoads?parameters&key=YOUR_API_KEY
使用我的项目中提供的 api 密钥,我得到了
{
"error": {
"code": 403,
"message": "Roads API has not been used in project **** before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/roads/overview?project=*** then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"status": "PERMISSION_DENIED",
"details": [
{
"@type": "type.googleapis.com/google.rpc.Help",
"links": [
{
"description": "Google developer console API activation",
"url": "https://console.developers.google.com/apis/api/roads/overview?project=****"
}
]
}
]
}
替换使用的密钥。
我在这里缺少什么?我应该在使用前在某处验证密钥吗? 或者,如果我只想试用样品,如何获得密钥?
【问题讨论】:
-
错误信息告诉你访问一个URL来启用它。你这样做了吗?
-
如果我尝试访问该网址,它会要求我登录谷歌帐户,但我从我的客户那里得到了这个密钥
-
然后与您的客户交谈。
标签: java google-maps google-api google-roads-api