Search code examples
here-api

Invalid credentials for reverse geocoding


Here is my call

https://reverse.geocoder.ls.hereapi.com/6.2/reversegeocode.json
?apiKey=SWxxxxxxx_D6xxxxxxxxx_ahxxxxxxxxxxxx&prox=41.8842,-87.6388,250&maxresults=1&mode=retrieveAddresses

Here is my response

<ns2:Error xmlns:ns2="http://www.navteq.com/lbsp/Errors/1" type="PermissionError" subtype="InvalidCredentials">
    <Details>invalid credentials for ZZtoxxxxxxxxxx</Details>
</ns2:Error>

However, this call, with the same credentials, returns a valid payload.

https://geocoder.ls.hereapi.com/search/6.2/geocode.json?languages=en-US&maxresults=4&searchtext=12 Main St&country=USA&SWxxxxxxx_D6xxxxxxxxx_ahxxxxxxxxxxxx

Please advise on how to correct.


Solution

  • There seems to be a space between

    https....?

    and

    apiKey

    Getting rid of that space should resolve your issue. https://reverse.geocoder.ls.hereapi.com/6.2/reversegeocode.json?apiKey={{RESTapiKey}}&prox=41.8842,-87.6388,250&mode=retrieveAddresses&maxresults=1