---
id: "telegram_bot_token"
kind: "datatype"
status: "draft"
is_pii: false
categories: ["secrets"]
langs: ["common"]
quality: 85
url: "http://registry.apicrafter.io/datatype/telegram_bot_token"
---

# Telegram bot token (`telegram_bot_token`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Token that authorizes a bot in the Telegram Bot API: the numeric bot ID, a colon and a secret that starts with A. Telegram documents the format only by example, so the regexp accepts the length of the documented samples (34 characters after the colon) and the length that the gitleaks secret scanner checks (35).

- Parent datatype: `api_key`
- Personal data (PII): no
- Categories: Secrets and credentials (passwords, keys, tokens) (secrets)
- Countries: global
- Languages: Common to most languages (common)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^[0-9]{5,16}:A[A-Za-z0-9_-]{33,34}$
```

## Examples

- `123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11` — Sample token from the Telegram Bot API documentation
- `4839574812:AAFD39kkdpWt3ywyRZergyOLMaJhac60qc` — Sample token from the Telegram bot tutorial
- `123456:ABC` (invalid example) — Secret part too short

## Supported by tools

- `detectsecrets`
- `gitleaks`
- `semgrep`
- `trufflehog`

## Sources

- doc: <https://core.telegram.org/bots/api#authorizing-your-bot>
- doc: <https://core.telegram.org/bots/tutorial>
- other: <https://github.com/gitleaks/gitleaks/blob/master/config/gitleaks.toml>

## Quality

Score 85/100. Missing: mapping (Wikidata, Schema.org, ...), translation.

JSON: <http://registry.apicrafter.io/api/v1/datatypes/telegram_bot_token.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/secrets/telegram_bot_token.yaml>
