Mik*_* Br 6 here-api here-maps-rest heremaps
这里 Maps 提供了 Maps Feedback API,用于提交有关其地图上缺少的地方的信息。我创建了一个项目并成功生成了用于 Places API 的 API 密钥。接下来,我尝试将它与反馈 API 一起使用,但它失败了。奇怪的是,没有任何凭据我得到了 200 OK。
我的要求:
curl --location --request POST 'https://maphub.api.here.com/feedback/' \
--header 'Content-Type: application/vnd.here.layerObjectList+json; charset=UTF-8' \
--header 'Accept-Charset: charset=UTF-8' \
--header 'Auth-Service-Id: here_app' \
--header 'Group-Id: FGx1AWaAzKOo0imNkLmf' \
--data-raw MY_DATA
Run Code Online (Sandbox Code Playgroud)
响应:200 OK包含id反馈的正文(对于检查状态很重要)。
maphub.cit.api.here.com代替maphub.api.here.com回复: 401 Unauthorized: Authentication failed. Reason: Missing authentication credentials
curl --location --request POST 'https://maphub.api.here.com/feedback/' \
--header 'Content-Type: application/vnd.here.layerObjectList+json; charset=UTF-8' \
--header 'Auth-Identifier: MY_APP_ID' \
--header 'Auth-Secret: MY_API_KEY' \
--header 'Group-Id: FGx1AWaAzKOo0imNkLmf' \
--header 'Auth-Service-Id: here_app' \
--data-raw MY_DATA
Run Code Online (Sandbox Code Playgroud)
回复: 401 Unauthorized: Authentication for app_id MY_APP_ID FAILED (wrong app_code provided).
我的仪表板我没有任何 app_code,所以我输入了 Auth-Secret 我的 API_KEY。
curl --location --request GET 'https://maphub.api.here.com/feedback/ID_FROM_FIRST_REQUEST'
Run Code Online (Sandbox Code Playgroud)
回复: 403 Forbidden
如何正确授权 Here Maps Feedback API?对我来说,发送反馈然后检查其状态很重要。
REST 端点*.api.here.com需要 APP_ID 和APP_CODE凭据。
但是,APP_ID 和 APP_CODE 凭证已于 2019 年 12 月被弃用,取而代之的是 API 密钥(与 APP_ID 相关,但后者不再在请求中发送)。
我假设您在更改后创建了开发人员帐户项目,这就是为什么您无法为 REST 服务创建旧版 APP_ID 和 APP_CODE 对的原因。
通常,REST 服务现在提供一个新的端点来*.hereapi.com精确地使用 API 密钥进行身份验证,同时*.api.here.com出于兼容性原因仍然提供旧端点。
问题是,我没有看到地图反馈 API 的新端点。它似乎不存在。这就是为什么我建议联系 selfservesupport@here.com,并提及该问题,因此您需要为生成的 APP_ID 提供 APP_CODE。
旧帐户有以下部分:
| 归档时间: |
|
| 查看次数: |
368 次 |
| 最近记录: |