我正在尝试从HERE Maps API服务FindSequence
发出GET请求。我注意到,在docs中,它包含三个身份验证参数:app_id
,app_code
,apiKey
。文档暗示可以选择使用app_id
和app_code
组合或单独使用apiKey
。这是有道理的,因为在HERE Maps文档的其他地方,注意到旧模式是使用app_id
和app_code
,但最近已弃用,现在应该单独使用apiKey
。实际上,您甚至无法在HERE开发人员项目仪表板中生成app_code
。
因此,我尝试使用apiKey
进行请求,但收到要求app_id
和app_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
,是否应该使用其他服务或该服务的其他版本来计算具有给定航点位置的最佳路线序列?
使用API密钥,您需要确保在*.hereapi.com
中查询较新的端点。
所以以下请求应该更好地工作:
curl --location --request GET "https://wse.ls.hereapi.com/2/findsequence.json?apiKey=[apiKey]¶m1=value1&...