본문 바로가기
my_lesson/_API

API - OpenWeatherMap 날씨 Invalid api key

by boolean 2017. 11. 25.
728x90


Invalid api key. please see http //openweathermap.org/faq#error401 for more info

Flowing next tip!!


First Tip !!


fetch(`http://api.openweathermap.org/data/2.5/weather?lat=${lat}&lon=${long}&APPID=${API_KEY}`)


Caution : Notice the difference between opostrophe and grave key



Second Tip !!!

That situation takes some time after the ReLoading(by myself) is done. Not immediately after ReLoading(by myself).

How to use API key in API call

Description:


To get access to weather API you need an API key whatever account you chose from Free to Enterprise.


Activation of an API key for Free and Startup plans takes 10 minutes. For other tariff plans it is 10 to 60 minutes.


We keep right to not to process API requests without API key.


How to get accurate API response

 Do not send requests more than 1 time per 10 minutes from one device/one API key. Normally the weather is not changing so frequently.

 Use the name of the server as api.openweathermap.org. Please never use the IP address of the server.

 Call API by city ID instead of city name, city coordinates or zip code. In this case you get precise respond exactly for your city. The cities' IDs can be found in the following file: Cities' IDs list.

 Free and Startup accounts have limitation of capacity and data availability. If you do not get respond from server do not try to repeat your request immediately, but only after 10 min. Also we recommend to store your previous request data.

댓글