Skip to content
Proud to collaborate with Microsoft for Startups

telegram.bot.validate-token ​

Validate a Telegram bot token via getMe and return bot metadata (bot_ref, username, first_name, is_bot)

Call Telegram getMe to validate a bot token and return bot metadata.

PENDING (auto_advance=execute) → COMPLETED with bot metadata ↘ FAILED on any error

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-telegram
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
bot_tokenstringYes—Telegram Bot API token issued by BotFather (format: <bot_id>:<token_secret>)
workflow_run_idstringNo—Engine-stamped parent run id (DAG step target)

Output Schema ​

FieldTypeRequiredDefaultDescription
bot_refintegerYes—Telegram integer bot reference returned by getMe
usernamestringYes—Bot @username (without @) returned by getMe
first_namestringNo—Display name of the bot returned by getMe (may be absent)
is_botbooleanYes—Always True for a valid bot token; surfaced for schema completeness
failure_reasonstringNo—Engine-stamped human-readable failure reason
failure_typestringNo—Engine-stamped failure category
failed_actionstringNo—Engine-stamped action that raised
failed_at_statestringNo—Engine-stamped state when the workflow failed
failed_stepstringNo—Engine-stamped step name (DAG path)
failed_layerstringNo—Engine-stamped layer index (DAG path)
errorstringNo—Engine-stamped exception message
error_typestringNo—Engine-stamped exception class name

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—executeValidate bot token via Telegram getMe
completedNoYesYes—Token valid; bot metadata captured
failedNoYesNo—Token validation failed

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompleted—
* (any state)failfailed—

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "telegram.bot.validate-token",
  "initial_data": {
    "bot_token": "value"
  }
}