【发布时间】:2020-01-13 15:47:38
【问题描述】:
我在 here-api 上注册了一个帐户,今天刚刚创建了一个新的 apiKey,因为我们仍然使用旧的身份验证方法。
不管我们使用什么身份验证,在尝试访问suggestion.json-endpoint 时都会收到ERR_CONNECTION_REFUSED 错误。其他端点工作正常。
IE。此请求工作正常:
https://geocoder.ls.hereapi.com/6.2/geocode.json?searchtext=200%20S%20Mathilda%20Sunnyvale%20CA&gen=9&apiKey={API_KEY}
但这失败了:
http://autocomplete.geocoder.ls.hereapi.com/6.2/suggest.json?query=Pariser+1+Berl&beginHighlight=<b>&endHighlight=</b>&apiKey={API_KEY}
显然使用相同的 API 密钥,但出现上述 ERR_CONNECTION_REFUSED 错误。
让我感到困惑的是,在第一个请求中从 apiKey 中删除一个字符会导致有意义的响应
{
"error": "Unauthorized",
"error_description": "ApiKey invalid. ApiKey not found."
}
而在第二个请求中执行此操作仍然只会返回 ERR_CONNECTION_REFUSED 错误。
【问题讨论】: