kinotto / geonames.js

Nodejs and Browser client for Geonames.org REST API :earth_africa:
http://www.geonames.org/export/client-libraries.html
MIT License
88 stars 17 forks source link

401 response (user does not exist) #21

Closed pixelass closed 4 years ago

pixelass commented 4 years ago

I am trying to use this library with a registered and activated user. Sadly I only get a 401 response.

http://api.geonames.org/findNearbyPlaceName?lat=47.3&lng=9&username=MY_USER_NAME (replace: MY_USER_NAME) returns

<geonames>
<status message="user does not exist." value="10"/>
</geonames>
kinotto commented 4 years ago

Hi @pixelass , this is the response i'm getting (replacing MY_USER_NAME with a valid user)

<geonames>
<geoname>
<toponymName>Chrüzegg</toponymName>
<name>Chrüzegg</name>
<lat>47.2985</lat>
<lng>9.01488</lng>
<geonameId>7910950</geonameId>
<countryCode>CH</countryCode>
<countryName>Switzerland</countryName>
<fcl>P</fcl>
<fcode>PPLX</fcode>
<distance>1.1379</distance>
</geoname>
</geonames>

Most likely you're using an invalid user If you keep getting the error i recommend asking in the geonames dedicated forum, this library is just a wrapper around thieir REST webservices. in no way i have control over the responses 😕

pixelass commented 4 years ago

Sorry I noticed this too. I'll ask in the forum

kinotto commented 4 years ago

thank you @pixelass , i hope you'll sort it out