Available languages: [Python](https://databento.com/docs/api-live/basics/authentication.python.md) · [C++](https://databento.com/docs/api-live/basics/authentication.cpp.md) · [Rust](https://databento.com/docs/api-live/basics/authentication.rust.md) · [Raw](https://databento.com/docs/api-live/basics/authentication.raw.md)

Source: https://databento.com/docs/api-live/basics/authentication


### Authentication

Databento uses API keys to authenticate requests. You can view and manage
your keys on the [API keys]($PLATFORM_HOSTNAME/portal/keys) page of your portal.

Each API key is a 32-character string. By default, our library uses the
environment variable `DATABENTO_API_KEY` as your API key. However, if you
pass an API key to the `Live` constructor through the `key` parameter,
then this value will be used instead.

Our Live API uses a challenge-response authentication mechanism to ensure that
your API key is never sent over the network.

Related: [Securing your API keys](https://databento.com/docs/portal/api-keys.md#securing-your-api-keys).

#### Example usage

```python
import databento as db

# Create a live client
client = db.Live(key="$YOUR_API_KEY")

# Authentication happens on the first subscribe
client.subscribe(
    dataset="GLBX.MDP3",
    schema="trades",
    stype_in="parent",
    symbols="ES.FUT",
)
```
