|
| 1 | +{ |
| 2 | + "schema_version": "1", |
| 3 | + "id": "telegram", |
| 4 | + "display_name": "Telegram Bot API", |
| 5 | + "description": "Set up a Telegram bot and get an API token for sending messages, managing groups, and building bot interactions.", |
| 6 | + "category": ["messaging", "bots"], |
| 7 | + "website": "https://core.telegram.org/bots/api", |
| 8 | + "auth_types": ["api_key"], |
| 9 | + "estimated_time": "5 minutes", |
| 10 | + "prerequisites": [ |
| 11 | + "A Telegram account" |
| 12 | + ], |
| 13 | + "outputs": [ |
| 14 | + { |
| 15 | + "key": "TELEGRAM_BOT_TOKEN", |
| 16 | + "description": "Bot token for authenticating requests to the Telegram Bot API", |
| 17 | + "sensitive": true |
| 18 | + } |
| 19 | + ], |
| 20 | + "steps": [ |
| 21 | + { |
| 22 | + "id": "intro", |
| 23 | + "type": "info", |
| 24 | + "message": "We'll get you a Telegram bot token via BotFather, the official tool for creating and managing Telegram bots." |
| 25 | + }, |
| 26 | + { |
| 27 | + "id": "open_botfather", |
| 28 | + "type": "open_url", |
| 29 | + "url": "https://t.me/BotFather", |
| 30 | + "message": "Opening BotFather in Telegram. This is the official bot for creating and managing Telegram bots." |
| 31 | + }, |
| 32 | + { |
| 33 | + "id": "check_existing", |
| 34 | + "type": "prompt_choice", |
| 35 | + "message": "Do you already have a bot you want to use?", |
| 36 | + "choices": [ |
| 37 | + { "label": "Create a new bot", "next": "create_bot" }, |
| 38 | + { "label": "Use an existing bot", "next": "existing_bot" } |
| 39 | + ] |
| 40 | + }, |
| 41 | + { |
| 42 | + "id": "create_bot", |
| 43 | + "type": "info", |
| 44 | + "message": "Send /newbot to BotFather. It will ask you for a display name (can be anything) and then a username (must end in 'bot', e.g. 'my_cool_bot'). Once done, BotFather will reply with your bot token." |
| 45 | + }, |
| 46 | + { |
| 47 | + "id": "confirm_created", |
| 48 | + "type": "prompt_confirm", |
| 49 | + "message": "Bot created?" |
| 50 | + }, |
| 51 | + { |
| 52 | + "id": "existing_bot", |
| 53 | + "type": "info", |
| 54 | + "message": "Send /mybots to BotFather, select your bot, then tap 'API Token' to view the token." |
| 55 | + }, |
| 56 | + { |
| 57 | + "id": "collect_token", |
| 58 | + "type": "prompt_input", |
| 59 | + "output_key": "TELEGRAM_BOT_TOKEN", |
| 60 | + "message": "Paste your bot token here (looks like 123456789:ABCdefGhI...):", |
| 61 | + "validation": "^\\d{8,}:[A-Za-z0-9_-]{30,}$", |
| 62 | + "validation_error": "That doesn't look like a valid Telegram bot token. It should be a number, followed by a colon, followed by a long alphanumeric string (e.g. 123456789:ABCdefGhIJklmNOPqrsTUVwxyz)." |
| 63 | + }, |
| 64 | + { |
| 65 | + "id": "validate_token", |
| 66 | + "type": "validate", |
| 67 | + "method": "http_get", |
| 68 | + "depends_on": ["collect_token"], |
| 69 | + "message": "Checking your bot token works...", |
| 70 | + "on_success": "Bot token verified. Your bot is ready to use.", |
| 71 | + "on_failure": "Couldn't verify the token. Make sure you copied it correctly and the bot hasn't been deleted.", |
| 72 | + "config": { |
| 73 | + "url": "https://api.telegram.org/bot{{TELEGRAM_BOT_TOKEN}}/getMe" |
| 74 | + } |
| 75 | + } |
| 76 | + ], |
| 77 | + "gotchas": [ |
| 78 | + "Bot tokens don't expire, but can be revoked by sending /revoke to BotFather.", |
| 79 | + "Bots can't message users first. A user must send /start to your bot before it can reply to them.", |
| 80 | + "Bot usernames must end in 'bot' (e.g. 'my_cool_bot' or 'MyCoolBot').", |
| 81 | + "The API rate limit is roughly 30 messages per second globally and 1 message per second per individual chat.", |
| 82 | + "For webhooks, you need a publicly accessible HTTPS URL. Self-signed certificates are supported." |
| 83 | + ], |
| 84 | + "version": "1.0.0", |
| 85 | + "last_verified": "2026-03-28" |
| 86 | +} |
0 commit comments