Telegram bot ID from a token
Send the bot token in a private chat to @username_to_id_bot. The reply has the name, the username and the flags. Without a subscription the ID is shortened: the first two digits are visible and the rest are hidden. The full ID opens from the button under the reply, or with a subscription. The price is on the button.
What the reply contains
- The name and username of the bot that owns the token.
- Five yes-or-no flags: can join groups, reads all messages, inline, business, Web App.
- The full ID, from the button or when a subscription is already active.
Where the token is not read
In a group the bot does not check the token. It says the token is visible to everyone in the chat and asks you to revoke it in @BotFather.
An invalid or already revoked token returns an error instead of a card. After a check, revoke the token in @BotFather anyway: it was in the chat.
This is not an HTTP API method. The API takes a username and returns an id. Do not send it a token.