here-api - Here Maps - 无法授权 Maps Feedback API

标签 here-api here-maps-rest heremaps

此处 Maps 提供了 Maps Feedback API,即提交有关其 map 上缺失地点的信息。
我创建了一个项目并成功生成了用于 Places API 的 API key 。接下来,我尝试将它与反馈 API 一起使用,但它失败了。奇怪的是,没有任何凭据我得到了 200 OK。

我的要求:

  • 标题中没有任何 APP_ID 或 KEY
  • 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
    

    回复:200 OK body 包含 id反馈(对于检查状态很重要)。
  • 同上,但对于 maphub.cit.api.here.com而不是 maphub.api.here.com

  • 回复:401 Unauthorized: Authentication failed. Reason: Missing authentication credentials
  • 带有 APP_ID 和 API_KEY
  • 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
    

    回复: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' 
    

    回复:403 Forbidden
    如何正确授权 Here Maps Feedback API?对我来说,发送反馈然后检查其状态很重要。

    最佳答案

    REST 端点 *.api.here.com期待 APP_ID 和 APP_CODE 证书。

    但是,APP_ID 和 APP_CODE 凭证已于 2019 年 12 月弃用,取而代之的是 API key (与 APP_ID 相关,但后者不再在请求中发送)。

    我假设您在更改后创建了您的开发者帐户项目,这就是您无法为 REST 服务创建旧版 APP_ID 和 APP_CODE 对的原因。

    通常,REST 服务现在在 *.hereapi.com 中提供一个新端点。正是为了使用 API key 进行身份验证,同时仍然提供旧端点 *.api.here.com出于兼容性原因。

    问题是,我没有看到 Map Feedback API 的新端点。它似乎不存在。
    这就是为什么我建议通过提及问题联系 selfservesupport@here.com,因此您需要为生成的 APP_ID 提供 APP_CODE。

    较旧的帐户具有以下部分:

    enter image description here

    关于here-api - Here Maps - 无法授权 Maps Feedback API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61633222/

    相关文章:

    here-api - 403 HERE 地理编码和搜索 API 禁止 "These credentials do not authorize access"

    javascript - 构建具有多个坐标的路线时,Nokia Here map 出现错误

    java - 如果不在函数中传递 View,则无法获取 PositioningManager 的实例

    javascript - 删除 HERE Maps Javascript API 中的自定义标记不起作用

    ios - 在 Here-API 中,我们如何在 MapView 中显示下载的区域包 NMAMapLoader?

    here-api - HERE map 摩洛哥和西撒哈拉

    android - HERE Maps Android 集成,MISSING_LIBRARIES 错误

    ios - 在此处的 map 中确定高速公路方向

    javascript - Here Maps - 在 "choose view"菜单中切换图 block 层