Trying to get this to work in the test environment and keep getting connection failure. Is there a test API for Geocoding with http? <cfhttp method="get" url="https://nominatim.openstreetmap.org/search?city=oxford,&country=New Zealand&format=geojson" getasbinary="never"> <cfoutput> <cfdump var="#cfhttp.filecontent#"> </cfoutput> asked 20 Jun '19, 02:51 LoganOSM |
Read the Nominatim usage policy: https://operations.osmfoundation.org/policies/nominatim/ You need to "Provide a valid HTTP Referer or User-Agent identifying the application (stock User-Agents as set by http libraries will not do)". If you do not, then it's very likely your requests will be blocked. (Learning how to set a user-agent in ColdFusion is outwith the scope of this help site and you'd probably need to ask on a ColdFusion support site.) answered 20 Jun '19, 12:04 Richard ♦ |
How do I create User-Agent identifying the application so API call will work?
How will depend on how you're making the https call. Is that via a web framework for a particular environment or language, or something else?
Edit: Richard has spotted that you're using Cold Fusion - best to follow his suggestion.
User-agent still not working. Can I provide an IP address to you to be granted permission? Or do you have one sample call that uses address to obtain lat/lng in geocode that does not require useragent or valid HTTP referer?