Telegram Bot Token

Detects Telegram Bot API tokens: the numeric bot ID, a colon, and a 35-character [A-Za-z0-9_-] secret. A leaked bot token grants full control of the bot -- reading its message traffic, sending messages to every chat it belongs to, and hijacking any workflow automation built on it.

Type
regex
Engine
universal
Confidence
medium
Confidence justification
Medium confidence: the shape is structurally pinned by three independent production detectors (35-character secret, numeric-ID:secret layout consistent with Telegram's own Bot API docs example) and Telegram Bot Token appears in GitHub's secret-scanning pattern set, which matches on the bare shape. The evidentiary split on the secret's first letter is disclosed honestly: gitleaks pins a case-sensitive leading A, but TruffleHog and Kingfisher impose no letter constraint and TruffleHog's test fixture contains a valid B-starting secret -- so this pattern follows the 2-of-3 no-pin majority. It is a digits:string layout rather than a literal vendor prefix -- log lines or ratio-like data (epoch:hash) can approximate it -- and both regex-first scanners (TruffleHog, gitleaks) choose to context-gate it in their rules, so the value-only tier is discovery-grade and the recommended confidence tier requires Telegram keywords in proximity.
Jurisdictions
global
Regulations
Criminal Code Act 1995 (Cth)
Frameworks
CIS Controls, ISO 27001, NIST CSF, SOC 2
Data categories
credentials, security
Scope
narrow
Risk rating
8
Platform compatibility
Purview: Compatible, GCP DLP: Unsupported, Macie: Unsupported, Zscaler: Compatible, Palo Alto: Unsupported, Netskope: Unsupported

Pattern

(?<![A-Za-z0-9_-])[0-9]{7,12}:[A-Za-z0-9_-]{35}(?![A-Za-z0-9_-])

Corroborative evidence keywords

telegram, telegram.org, api.telegram.org, TELEGRAM_BOT_TOKEN, BotFather, bot token, api key, api_key, apikey, access key, access token, auth token, authorization, bearer, conn str, connection string, connectionstring, cookie, credential, database (+39 more)

Proximity: 300 characters

Should match

Should not match

Known false positives

References