Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
583 views
in Technique[技术] by (71.8m points)

api - 此处映射{“错误”:“未经授权”,“ error_description”:“ ApiKey无效。 找不到ApiKey。”}文档错误(Here Maps {“error”:“Unauthorized”,“error_description”:“ApiKey invalid. ApiKey not found.”} Documentation Error)

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

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

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

I am using here maps api for routing and it's showing api key error key not found when i am passing key parameter in json format

(我在这里使用maps api进行路由,当我以json格式传递key参数时,显示未找到api key error key)

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

The maps is working find when i pass the key as simple string i don't know if there is any error in documentation or at the api please update this on your site and check it once

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

the working code is below:

(工作代码如下:)

// Instantiate a map and platform object:

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

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

just remove "{}" and it is working find

(只需删除“ {}”即可找到)

  ask by Abhay Vishnoi translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Thanks for for the feedback.

(感谢您的反馈。)

There is no such error in HERE API and documentations and this is written in every API documentation to replace your key holder.

(HERE API和文档中没有这样的错误,并且每个API文档中都记录有该错误以替换您的密钥持有人。)

However we can ask the team to update the document to remove the {} .

(但是,我们可以要求团队更新文档以删除{} 。)

so that it will not create any further confusion.

(这样就不会造成任何进一步的混乱。)

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

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...