Search code examples
here-api

Geocode Autocomplete example won't return result with my api key


I've generated the sample URL with my api key by clicking on the {YOUR_APIKEY} that inserts my API key into the example on HERE Geocoder Autocomplete API documentation page. I've then entered that in the URL bar of a Chrome browser. The result is a page that says:

This site can’t be reached, autocomplete.geocoder.ls.hereapi.com refused to connect. Search Google for autocomplete geocoder here api suggest ERR_CONNECTION_REFUSED

Can I not just test this to see what the result is? I need to be able to submit a URL and read the JSON result for a list of addresses. These are ill-formatted addresses, so I'm looking for the autocomplete to try to find the correct address.


Solution

  • It looks like Geocoder Autocomplete API doesn't redirect http requests to https, so just update your requests to use https:

    https://autocomplete.geocoder.ls.hereapi.com/6.2/suggest.json?apikey=<YOUR_APIKEY>&query=Pariser+1+Berl