# Authentication: your API key

- Section: Get started (TTF API reference)
- Source: https://ttf.bot/developers/docs/#authentication
- The whole reference as one text: https://ttf.bot/developers/docs/llms-full.txt

Every data call carries your API key in a header. That is all.

Send the key in the `Authorization` header:

```
Authorization: Bearer ttfk_xxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
```

If your tool cannot set `Authorization`, use `X-API-Key: YOUR_KEY` instead. Never put the key in the address (URL): addresses end up in logs and browser history.

## Where do I get a key?

In the [dashboard](https://ttf.bot/developers/app/), tab **Overview**, panel **API keys**: type a name (for example `my bot`) and press **Create key**. The full key is shown **once**: copy it then. Lost it? Revoke it and make a new one, it takes a second. Your plan decides how many keys you can have.

## Keep it safe

- Put it in an environment variable or a secret store, not in your code.
- Never in a web page or a Telegram mini app that users can open: anyone could read it there. Call the API from your server or your bot.
- Give each app its own key, so you can revoke one without stopping the others.
- Optional, under **Options** when you make the key: an end date (**Expires**), its own **Monthly credit cap**, and **Allowed IPs** (only your server's addresses may use it).
- A key can only read data, unless you gave it [webhook access](https://ttf.bot/developers/docs/md/webhook-api.md) when you made it.

## No key needed

[Chains & prices](https://ttf.bot/developers/docs/md/chains.md) and [Service health](https://ttf.bot/developers/docs/md/health.md) are open and free.
