Samuel Aubin Samuel Aubin - 20 days ago 10
JSON Question

Using World Weather Online

I am trying to access the Marine library for the api, World Weather Online

i have signed up and have a api key although the docs are not helping be configure the url needed to access the api.

I have tried this url-
http://api.worldweatheronline.com/free/v2/weather.ashx?key=XXXXXXXXXXXXXXXXXXXXX&q=48.85,2.35&format=json

and am getting the response-


{ "data": { "error": [ {"msg": "API key does not have access to the resource." } ] }}


Not this replaces my key = XXXXXXXXXXXXXXXXXXXXX

Any ideas

Answer

Ah, I think I know. When you sign up, they give a free trial of premium api access. And, apparently, the api key they give you, it doesn't work with free endpoints, for whatever reason. It works with premium ones, though.

http://api.worldweatheronline.com/premium/v1/weather.ashx?key=xxxxxxxxxxxxxxxx&q=London&format=json&num_of_days=5