# API Authentication

## Authentication Headers

To authenticate your requests, you need to include an `Authorization` HTTP header containing your API key. The format is as follows:

```
"Authorization: Bearer <YOUR API KEY>"
```

A complete example with *curl*:

<Tabs>
  <Tab value="bash">
    ```sh
    curl -H "Authorization: Bearer <YOUR API KEY>" \
        --get \
        --data "lat=48.369" \
        --data "lon=5.376" \
        "https://api.meteonorm.com/v1/climate/tmy"
    ```
  </Tab>

  <Tab value="cmd">
    ```sh
    curl -H "Authorization: Bearer <YOUR API KEY>" ^
        --get ^
        --data "lat=48.369" ^
        --data "lon=5.376" ^
        "https://api.meteonorm.com/v1/climate/tmy"
     ```
  </Tab>

  <Tab value="powershell">
    ```sh
    $url = "https://api.meteonorm.com/v1/altitude?lat=48.369&lon=5.376"
    $headers = @{ Authorization = "Bearer <YOUR API KEY>" }

    $response = Invoke-WebRequest -Uri $url -Headers $headers -Method Get
    $response.Content
    ```
  </Tab>
</Tabs>

Note that you can test API requests [for free](./overview/demo).


## Creating and Managing API Keys

Once you have a subscription (_bundle_ or _plan_), you can manage your API keys at
[go.meteotest.ch/my/](https://go.meteotest.ch/my/) under "Products & Configurations" → "Meteonorm API Key Pool":

![API Key Pool](/api-keys-management.png)

:::note

**Note:** New API keys may take up to 5 minutes to become active.

:::
