MyAgens
MyAgens
Telegram

How to find your Telegram user ID

Updated Jul 4, 2026 2 min

MyAgens uses your Telegram user ID to make sure it only takes orders from you, not from anyone else who happens to find your bot. Your user ID is a number (not your @username), and it never changes. Here is how to find it.

The fastest way

  1. Open Telegram and search for @userinfobot.
  2. Open the chat and press Start (or send any message).
  3. It replies with your account details, including your Id, a number like 123456789.

That number is your Telegram user ID. Copy it.

Other bots that show your ID

If you would rather not use that one, any of these work the same way: send them a message and they reply with your numeric ID.

  • @RawDataBot shows your ID along with the raw message data.
  • @getidsbot shows your user ID and the ID of any chat you forward from.

Why MyAgens needs it

Your bot token lets MyAgens send and receive messages, but on its own it does not know who is allowed to give commands. Your user ID is the allow-list (stored as ALLOWED_USER_IDS): MyAgens answers the IDs on the list and silently ignores everyone else, so a stranger who finds your bot cannot make it do anything. You can add more than one ID, comma-separated, to share the fleet.

For a second lock on Telegram's side, turn on Restrict bot usage in BotFather's Mini App, so strangers cannot even open a chat with your bot. The BotFather guide shows the toggle.

Connect it to MyAgens

The terminal-only setup wizard asks for your user ID during install, right after the bot token; paste it in when prompted. The browser setup detects it for you when you press START in your bot's chat, so there you never need this number. If you have not made the bot yet, start here: How to create your first Telegram bot with BotFather.