How to Get Your Telegram API ID and API Hash

The Telegram API ID and API Hash are credentials needed for building custom Telegram clients or userbots using the MTProto protocol. Here is how to get them.

Step-by-Step Instructions

  1. Go to my.telegram.org in your browser.
  2. Enter your phone number (with country code) and click "Next".
  3. Telegram sends a verification code to your Telegram app (not SMS). Enter it.
  4. Click "API development tools".
  5. Fill out the form: App title, Short name, Platform, and Description.
  6. Click "Create application".
  7. Your App api_id and App api_hash are displayed. Save them securely.

Important Notes

What You Can Build

With an API ID, you can build custom Telegram clients, userbots (scripts that run on your own account), message scrapers, account automation, and more using libraries like Telethon (Python) or GramJS (JavaScript).

Frequently Asked Questions

What is the difference between API ID and Bot Token?

A Bot Token is used with the simpler Bot API to control a bot account. An API ID + Hash are used with the lower-level MTProto protocol to build full Telegram clients or automate your personal account (userbots).

Can I get a new API ID if mine is compromised?

No. Telegram only allows one API ID per phone number, and it cannot be deleted or regenerated. If your API Hash is leaked, contact Telegram support. To get a fresh set, you would need a different phone number.

Get Your Telegram ID Now

More How-To Guides

How to Find Your Telegram User ID (3 Easy Methods)
How to Find a Telegram Chat ID (Group & Private)
How to Find a Telegram Channel ID in 2026
How to Find a Telegram Group ID (Supergroup & Basic)
Check My ID