← Back to Fwrd

Telegram Bot Tester: Check a Token and Send a Message

Paste your bot’s token to see its name and @username, then send a sample message to any chat ID. If Telegram refuses, you get its error in plain words and what to do next.

It runs in your browser. Your token goes straight to Telegram (api.telegram.org) and nowhere else: this site never sees it, and nothing is saved. Treat the token like a password: anyone who has it controls your bot. If it leaks, send /revoke to BotFather for a new one.

How to use it

  1. Make a bot if you don’t have one: in Telegram, message @BotFather, send /newbot, and copy the token it gives you.
  2. Paste the token here and press Check token. You’ll see the bot’s name and @username, and nothing is sent.
  3. Open your bot in Telegram and tap Start, so it’s allowed to message you. For a group, add the bot to the group. For a channel, add it as an admin.
  4. Paste the chat ID and press Send a message. The Telegram chat ID finder shows the ID if you don’t have it.

Don’t have it? The Telegram chat ID finder shows it.

Need the chat ID? The Telegram chat ID finder lists every chat that messaged your bot, with each ID ready to copy.

Telegram’s errors in plain words

When a bot isn’t sending messages, Telegram says why in one line. The tester shows that line in plain words. Here is each one, with what to do.

Bad Request: chat not found (error 400)
Telegram can’t find that chat for this bot. Copy the chat ID again from the Telegram chat ID finder: a group’s ID keeps its minus sign, and a channel’s or supergroup’s starts with -100. For a private chat, open the bot and tap Start first. For a group or channel, add the bot to it first.
Forbidden: bot can't initiate conversation with a user (error 403)
A bot can’t message someone first. Open the bot in Telegram, tap Start or send it any message, then send again.
Forbidden: bot was blocked by the user (error 403)
The person with this chat ID blocked the bot. Open the bot in Telegram, unblock it or tap Restart, then send again.
Bad Request: chat_id is empty (error 400)
Telegram got no chat ID. Paste the chat’s ID into the chat ID box; the Telegram chat ID finder shows it.
Bad Request: group chat was upgraded to a supergroup chat (error 400)
This group became a supergroup, which gave it a new ID that starts with -100. Use the new ID here, and anywhere else you saved the old one.
Unauthorized (error 401)
Telegram doesn’t recognize this token. It may be mistyped or cut short, or it was replaced in BotFather. Copy the newest token from BotFather, all in one go, and try again.
Forbidden: bot is not a member of the channel chat (error 403)
The bot isn’t in this group or channel, or it was removed. Add the bot to the group, or add it to the channel as an admin, then send again.
Bad Request: need administrator rights in the channel chat (error 400)
The bot isn’t allowed to post in this chat. In a channel, make the bot an admin with Post Messages on. In a group, let members send messages, or make the bot an admin.
Forbidden: bot can't send messages to bots (error 403)
This chat ID belongs to a bot, and bots can’t message each other or themselves. Use the ID of your own chat with the bot; the Telegram chat ID finder shows it.
Too Many Requests: retry after 7 (error 429)
Telegram limits how fast one bot can send. Wait the seconds it names, then send again.

The request Fwrd sends

Fwrd’s iPhone app sends each forwarded text to Telegram’s sendMessage as this JSON. The tester sends the same fields.

{
  "chat_id": "-1001234567890",
  "text": "Your sign-in code is 482913",
  "link_preview_options": {
    "is_disabled": true
  }
}

The same from a terminal, with your token after the word bot. The first line reads the bot’s name:

curl "https://api.telegram.org/bot<YOUR_TOKEN>/getMe"

curl -X POST "https://api.telegram.org/bot<YOUR_TOKEN>/sendMessage" \
  -H "Content-Type: application/json" \
  -d '{"chat_id": "<CHAT_ID>", "text": "Hello from my bot", "link_preview_options": {"is_disabled": true}}'
  • chat_id is the chat’s ID as Telegram gives it, minus sign and all. A public channel’s @username works too.
  • text is the message, up to 4,096 characters. With no parse_mode, Telegram shows it exactly as written, so a * or _ in a text can’t break it.
  • link_preview_options with is_disabled set to true stops a link in the text from opening a preview.
  • Telegram answers "ok": true with the message it made, or "ok": false with a description of what went wrong.
  • From a web page, send the same fields as a form post (application/x-www-form-urlencoded), as this page does. Telegram reads them the same way.

Sending your iPhone’s texts to this chat

I built this for Fwrd, my iPhone app that forwards the texts you choose to Telegram, such as sign-in codes or alerts, including while the iPhone is locked. It sends only the text of each matching message, unchanged, with no title or formatting; to add a From: line, turn on Include Who Sent It and set Sender on Fwrd’s action in Shortcuts. There’s no account and no Fwrd server: your iPhone talks to Telegram directly. Paste the token and the chat ID into Fwrd’s Telegram destination. The Telegram setup guide walks through the rest.

Fwrd on the App Store: free for 15 forwards a month.