How to Get Your Telegram API Key
Complete step-by-step guide to obtain your Telegram API key and App ID from my.telegram.org. Includes screenshots, security tips, and troubleshooting for developers getting started with Telegram API.
Prerequisites
- Active Telegram account with verified phone number
- Access to SMS on your registered phone
- Web browser (preferably desktop for better experience)
What You'll Need
Telegram Account
Active account with verified phone number
Phone Access
Ability to receive SMS verification codes
Project Details
App name, description, and platform info
Step-by-Step Guide
Navigate to my.telegram.org
Open your web browser and go to my.telegram.org.
Click on the "API Development Tools" button to begin the registration process.
Browser Recommendation
Enter Your Phone Number
Enter your phone number in international format (e.g., +1234567890).
This must be the same phone number associated with your Telegram account.
Important Note
Verify with SMS Code
Check your phone for a 5-digit verification code sent via SMS.
Enter the code in the verification field on the website.
If you don't receive the code within 2-3 minutes, you can request a new one.
Troubleshooting
Create New Application
Fill out the application creation form with the following details:
- App title: Your application's name (e.g., "My Bot App")
- Short name: A short identifier (alphanumeric, 5-32 chars)
- URL: Your app's website (optional but recommended)
- Platform: Select the appropriate platform (Web, Desktop, etc.)
- Description: Brief description of what your app does
Secure Your Credentials
Once your application is created, you'll receive:
- App ID: A numeric identifier (e.g., 123456)
- API Hash: A 32-character string (e.g., abc123...)
Security Alert
Save these credentials immediately! The API Hash will be partially hidden after you leave the page.
Store them in a secure location like a password manager or environment variables.
API Key vs Bot Token: What's the Difference?
API Key (App ID + Hash)
- ✅ For user applications and MTProto clients
- ✅ Access user account features
- ✅ Higher rate limits
- ✅ Can send messages as user
- ❌ Requires phone verification
- ❌ More complex authentication
Bot Token (from BotFather)
- ✅ For automated bots
- ✅ Easy to get from @BotFather
- ✅ Simple HTTP API
- ✅ No phone verification needed
- ❌ Limited bot-specific features
- ❌ Lower rate limits
Which Should You Choose?
Use API Key if you're building:
- Client applications that act on behalf of users
- Advanced automation requiring user permissions
- High-volume messaging applications
Use Bot Token if you're building simple bots for basic automation.
Security Best Practices
Store Securely
Use environment variables or secure vaults. Never commit credentials to version control.
Limit Access
Only share credentials with team members who absolutely need them.
Monitor Usage
Regularly check your application's activity for any suspicious behavior.
Backup Safely
Create encrypted backups of your credentials in multiple secure locations.
Common Issues & Solutions
SMS verification code not received
- Wait 2-3 minutes before requesting a new code
- Check if your phone number is correctly formatted (+country code)
- Try requesting code via Telegram app instead of SMS
- Ensure your phone can receive international SMS
"Phone number not registered" error
- Ensure the phone number is registered with Telegram
- Check the international format (+1234567890)
- Try logging into Telegram app with this number first
Form submission fails or times out
- Try using a desktop browser instead of mobile
- Disable browser extensions that might interfere
- Clear browser cache and cookies
- Try a different browser (Chrome, Firefox, Safari)
- Check your internet connection stability
Can't see full API Hash after creation
This is normal security behavior. Telegram only shows the full API Hash once.
- If you didn't save it, you'll need to create a new app
- Always copy credentials immediately when shown
- Store them in a secure password manager
Next Steps After Getting Your API Key
For Bot Development
- • Set up your development environment
- • Choose between Webhook and Long Polling
- • Create your first bot with Node.js or Python
- • Test API connectivity and authentication
For Client Applications
- • Set up MTProto client library
- • Implement user authentication flow
- • Handle session management
- • Test with basic API calls
Environment Variables Setup
Add these to your environment:
Frequently Asked Questions
What's the difference between API Key and Bot Token?
Can I use the same API Key for multiple apps?
Why do I need a phone number to get API Key?
Is there a cost for Telegram API Key?
Can I regenerate my API Key if compromised?
Ready to Start Building with Telegram API?
Now that you have your API key, take your Telegram automation to the next level with Wapiuu's comprehensive tools and integrations.