【问题标题】:Here Maps {"error":"Unauthorized","error_description":"ApiKey invalid. ApiKey not found."} Documentation Error这里 Maps {"error":"Unauthorized","error_description":"ApiKey invalid. ApiKey not found."} 文档错误
【发布时间】:2021-09-16 19:22:34
【问题描述】:

https://developer.here.com/documentation/maps/dev_guide/topics/routing.html

{"error":"Unauthorized","error_description":"ApiKey invalid. ApiKey not found."}

我在这里使用 maps api 进行路由,当我以 json 格式传递 key 参数时,它显示 api key error key not found

// Instantiate a map and platform object:
var platform = new H.service.Platform({
  'apikey': '{YOUR_APIKEY}'
});

当我将密钥作为简单字符串传递时,地图正在运行,我不知道文档或 api 中是否有任何错误,请在您的网站上更新并检查一次

工作代码如下:

// 实例化地图和平台对象:

var platform = new H.service.Platform({
  'apikey': 'YOUR_APIKEY'
});

只需删除“{}”,它就可以正常工作了

【问题讨论】:

    标签: api here-api unauthorizedaccessexcepti here-maps-rest keynotfoundexception


    【解决方案1】:

    您应该接受您的请求并将其粘贴到谷歌搜索(网页搜索顶部栏)。最后删除任何问号,您将看到它会起作用,并将重新格式化请求。复制 Google 的请求并立即在 Postman 上试用;希望它会工作...... 它对我有用。

    【讨论】:

      【解决方案2】:

      在 HERE API 和文档中没有这样的错误,这是写在每个 API 文档中以替换您的密钥持有者。但是,我们可以要求团队更新文档以删除 {}。以免造成进一步的混乱。

      https://developer.here.com/documentation/routing/dev_guide/common/credentials.html

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2018-06-02
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2015-06-22
        • 1970-01-01
        相关资源
        最近更新 更多