Some simple Server and Client side JavaScript/PHP examples for Tibber GraphQL calls
Note! As the API KEY is in plain text, the Javascript scripts should only be published on your local computer or local server behind a firewall, and not exposed to Internet.
In all files replace THE_API_KEY with your personal Tibber API key.
Display current energy price as simple text.
Display current energy price as a guage. Requires kuma-gauge.jquery.js
PHP example to run on server. Returns a formatted text of current energy price.