Authorization

How to authenticate your requests to the Electricity Maps API.

All requests to the API (except for /zones) must be authorized.

The API key should be included as a header on the request: auth-token: my-api-token.

Example with cURL:

curl 'https://api.electricitymaps.com/v4/carbon-intensity/latest?zone=DE' \
-H 'auth-token: my-api-token'

It is also possible to use Basic Auth if preferred:

# The base64 encoded string should be "my-email:my-api-token"
Authorization: Basic <Base64 encoded email and api key>
You can find your API key on the API access page when signed in. Sign up to get started.