Search code examples
here-api

HERE Maps Intermodal Routing API v8 Example does not work (API Key Auth)


HERE Maps newbie here,

I have set up an account and tried to run the example for intermodal routing (Link)

I basically copy pasted the GET request into the browser and replaced {YOUR_API_KEY} with a key that I have generated in advance({MY_API_KEY}):

https://intermodal.router.hereapi.com/v8/routes?apyKey={MY_API_KEY}&alternatives=2&destination=52.40358749909618,13.058351363288239&origin=52.53105637575095,13.384944833815183

This is the response that I am getting:

{"error":"Unauthorized","error_description":"Bearer token invalid. Bearer missing or bearer value missing."}

Other API requests work like a charm with the same API key - e.g. the below normal route request works:

https://router.hereapi.com/v8/routes?apiKey={MY_API_KEY}&transportMode=car&origin=52.5308,13.3847&destination=52.5264,13.3686

I also tried to replace "apyKey=" with "apiKey=" in the topmost request, but the response stays the same...

Am I missing something (else) or is there something broken with the apiKey Auth for this API?

Best!


Solution

  • It works with apikey, so:

    https://intermodal.router.hereapi.com/v8/routes?apikey={MY_API_KEY}&alternatives=2&destination=52.40358749909618,13.058351363288239&origin=52.53105637575095,13.384944833815183


    Normally apiKey or apikey should work, but it seems the service doesn't accept the one with capital "K"

    apyKey looks like documentation issue.