Guide for dummies: How to load API 4?
-
start with the samples/tutorials at https://api4.windy.com/. just copy the sample html as is into your own html file, put it on your web server, and look at the resulting page. make changes as needed. the samples cover a lot of ground in terms of typical changes folks might be interested in.
-
@fastseas Thanks!
-
@fastseas Sorry to bother you again, but I’m still struggling to load API4…
I copied the sample html as you informed and put it on my web server. But the page is blank in my sites?
In the sample, there is script for leaflet. Is it enough for loading the Leaflet library or have to I do something more?
Do you have any recommendations 😊
PS I changed the API key to my personal API key I got from Windy -
Just give us link and then it is easier to tell you what is wrong with it.
-
@siim link to my empty site is
https://www.sääneuvos.fi/test/testAPI4/ -
I think you need to publish this page also.
At the moment it shows "Page not found" / "HUPS! ETSIMÄÄSI SIVUA EI LÖYTYNYT."
-
@siim hmm, thanks! I'm using Wordpress. I made this testAPI4.php in test folder in my public html folder, but I have to still publish it somehow? Do you know have to make it in Wordpress?
-
@saaneuvos said in Guide for dummies: How to load API 4?:
testAPI4.php
ah, so the address is https://www.sääneuvos.fi/test/testAPI4.php.
when i try load that page, i see the js console is reporting the following error:
Windy API used on unauthorized domainHave you authorized your domain (www.sääneuvos.fi) in your API config (https://api4.windy.com/api-key/)? If you have, ivo's code might be having issues with the special characters in your domain name (ä)...
-
@fastseas Thanks again! I'll try that...
-
@fastseas Great!! Thanks for you time. It's now working. The reason was The special characters, because I had authorized my domain... @ivo FYI The special characters in domain cause problems with API4. It's maybe good idea to mention this on the API-page (https://api4.windy.com/api-key/)?