Support Center

Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

{"cod":401, "message": "Invalid API key. Please see http://openweathermap.org/faq#error401 for more

Peter Jan 11, 2019 04:22AM GMT

Dear agent,

I recently signed up for the free account and my key appeared to be working only in a normal browser (chrome & firefox) with a test url:

http://api.openweathermap.org/data/2.5/weather?q=London,uk&APPID=<mykey>

However, the same url will yield the 401 error described in the subject line if I fire a curl command:

curl http://api.openweathermap.org/data/2.5/weather?q=London,uk&APPID=<theSameKey>

Is there any header that must be set for curl to work properly with the API? Thanks!!

Peter

Up 0 rated Down
Pavel Zuykov Jan 11, 2019 05:12AM GMT OpenWeatherMap Agent

Hello

Use curl “http://api.openweathermap.org/data/2.5/weather?q=London,uk&APPID=<theSameKey>”

Post Your Public Answer

Your name (required)
Your email address (required)
Answer (required)
9eda11838f597e7a95b6a1c991dcae0a@openweathermap.desk-mail.com
https://cdn.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete