对findsequence服务请求进行身份验证HERE Maps API

时间:2020-05-22 20:51:01

标签: here-api here-maps-rest

我正在尝试从HERE Maps API服务FindSequence发出GET请求。我注意到,在docs中,它包含三个认证参数:app_idapp_codeapiKey。文档暗示可以选择使用app_idapp_code组合或单独使用apiKey的选项。这是有道理的,因为在HERE Maps文档的其他地方,已经注意到旧的模式是使用app_idapp_code,但是最近已弃用,现在应该单独使用apiKey 。实际上,您甚至无法在HERE开发人员项目仪表板中生成app_code

因此,我尝试向apiKey发出请求,但遇到了要求app_idapp_code的身份验证错误:

`curl --location --request GET "https://wse.api.here.com/2/findsequence.json?apiKey=[apiKey]`

{"faultCode":"s74149e0f-5b37-41b1-bf25-0d5f93e06938","responseCode":"400","message":"The request is missing the app_id and app_code parameters. They must both be passed as query parameters. If you do not have app_id and app_code, please obtain them through your customer representative or at http://developer.here.com/myapps."}

据我了解,免费增值帐户没有客户代表。我已经寻求技术帮助,他们把我送到了Stack Overflow。我跟随了URL http://developer.here.com/myapps,但是它重定向到https://developer.here.com/projects。据我所知,无法从此URL获取app_code

我的问题是: 1)我需要提供app_code吗?如果没有,如何在没有请求的情况下提出请求?如果我确实需要app_code,该如何获取? 2)如果无法再获得app_code,我是否应该使用其他服务或该服务的其他版本来计算具有给定航点位置的最佳路线序列?

1 个答案:

答案 0 :(得分:1)

使用API​​密钥,您需要确保在*.hereapi.com中查询较新的终结点。

因此,以下请求应更好地工作:

curl --location --request GET "https://wse.ls.hereapi.com/2/findsequence.json?apiKey=[apiKey]&param1=value1&...