这里 API 获取速度限制得到 PermissionError
Here API getting speed limit got PermissionError
调用此处 api 后出现权限错误。
https://route.cit.api.here.com/routing/7.2/calculateroute.json?jsonAttributes=1&waypoint0=51.31854,9.51183&waypoint1=50.11208,8.68342&departure=2019-01-18T10:33:00&routeattributes=sh,lg&legattributes=li&linkattributes=nl,fc&mode=fastest;car;traffic:enabled&app_code=xx&app_id=xx
我将其用于 APP Id 和 API 密钥用于 app_code 但无法正常工作。如何解决这个问题?
{
"_type": "ns2:RoutingServiceErrorType",
"type": "PermissionError",
"subtype": "InvalidCredentials",
"details": "This is not a valid app_id and app_code pair. Please verify that the values are not swapped between the app_id and app_code and the values provisioned by HERE (either by your customer representative or via http://developer.here.com/myapps) were copied correctly into the request.",
"metaInfo": {
"timestamp": "2021-12-14T14:26:21Z",
"mapVersion": "8.30.127.153",
"moduleVersion": "7.2.202150-9770",
"interfaceVersion": "2.6.77",
"availableMapVersion": [
"8.30.127.153"
]
}
}
app_code与apiKey不一样
app_id/app_code 组合是 HERE 位置服务已弃用的身份验证方法,这就是为什么您在开发人员门户中找不到与您的 app_id 匹配的 app_code 的原因。
改为尝试仅使用 apiKey:
https://route.ls.hereapi.com/routing/7.2/calculateroute.json?jsonAttributes=1&waypoint0=51.31854,9.51183&waypoint1=50.11208,8.68342&departure=2019-01-18T10:33:00&routeattributes=sh,lg&legattributes=li&linkattributes=nl,fc&mode=fastest;car;traffic:enabled&apiKey=[YOUR_API_KEY]
请注意,使用 apiKey 时基础 URL 略有不同。
调用此处 api 后出现权限错误。
https://route.cit.api.here.com/routing/7.2/calculateroute.json?jsonAttributes=1&waypoint0=51.31854,9.51183&waypoint1=50.11208,8.68342&departure=2019-01-18T10:33:00&routeattributes=sh,lg&legattributes=li&linkattributes=nl,fc&mode=fastest;car;traffic:enabled&app_code=xx&app_id=xx
我将其用于 APP Id 和 API 密钥用于 app_code 但无法正常工作。如何解决这个问题?
{
"_type": "ns2:RoutingServiceErrorType",
"type": "PermissionError",
"subtype": "InvalidCredentials",
"details": "This is not a valid app_id and app_code pair. Please verify that the values are not swapped between the app_id and app_code and the values provisioned by HERE (either by your customer representative or via http://developer.here.com/myapps) were copied correctly into the request.",
"metaInfo": {
"timestamp": "2021-12-14T14:26:21Z",
"mapVersion": "8.30.127.153",
"moduleVersion": "7.2.202150-9770",
"interfaceVersion": "2.6.77",
"availableMapVersion": [
"8.30.127.153"
]
}
}
app_code与apiKey不一样
app_id/app_code 组合是 HERE 位置服务已弃用的身份验证方法,这就是为什么您在开发人员门户中找不到与您的 app_id 匹配的 app_code 的原因。
改为尝试仅使用 apiKey:
https://route.ls.hereapi.com/routing/7.2/calculateroute.json?jsonAttributes=1&waypoint0=51.31854,9.51183&waypoint1=50.11208,8.68342&departure=2019-01-18T10:33:00&routeattributes=sh,lg&legattributes=li&linkattributes=nl,fc&mode=fastest;car;traffic:enabled&apiKey=[YOUR_API_KEY]
请注意,使用 apiKey 时基础 URL 略有不同。