If you want to build a custom Telegram client, automate a user account, or integrate deep messaging features into your software using Telegram’s MTProto API, you need a pair of core credentials: an api_id and an api_hash.
(Note: If you are simply trying to build a chat bot or a Telegram Mini App, you don’t need these credentials—you just need a bot token from @BotFather instead.)
Getting your official Telegram API credentials is entirely free and takes only a few minutes through Telegram’s core developer portal. Follow this step-by-step guide to get set up.
Step 1: Ensure Your Account is Active on an Official App
Before heading to the developer portal, make sure your Telegram account is fully active and registered through an official mobile or desktop application. You will need access to the phone number linked to your account because Telegram sends authorization codes via the app during the setup process.
Step 2: Log In to the Telegram Core Portal
- Open your web browser and go to the official Telegram developer portal: my.telegram.org.
- Enter the phone number associated with your Telegram account (make sure to include your country code in international format).
- Click Next. Telegram will send a confirmation message containing a login code directly to your official Telegram app (not via SMS).
- Copy that code from your app, enter it into the website browser, and sign in.
Step 3: Navigate to API Development Tools
Once you are logged into your dashboard:
- Click on API development tools.
- If this is your first time creating an application, you will be presented with a creation form.
Step 4: Fill Out the Application Form
You will need to provide a few brief details about the project you are building. Don’t worry—these fields can be changed later and don’t lock you into a strict naming convention:
- App title: A human-readable name for your application (
Leave a Reply