Simple, powerful API to integrate Telegram notifications into your applications in minutes
Everything you need to send notifications via Telegram
Built with FastAPI for maximum performance and minimal latency
No data logging, end-to-end encryption, and secure API key management
Full HTML support for beautiful, formatted messages
Send photos, documents, and files with captions
Send to specific forum topics in Telegram groups
Simple REST API with multipart/form-data support
Get up and running in 3 simple steps
Go to @MessageGateBot on Telegram and send /start
Use /key command to retrieve your unique API key
Use the API with your key to send messages, photos, and documents
Send messages to groups, channels, and specific forum topics
Send /key to @MessageGateBot in a direct message.
You'll receive a unique API key that sends messages to your personal chat.
Add @MessageGateBot to your group or channel. For channels, make sure the bot has "Post Messages" permission.
As an admin or owner, send /key in the group. The bot will send your API key privately to your DM.
Use the API key to send messages directly to your group or channel!
Each forum topic gets its own unique API key! Perfect for organizing notifications by project, environment, or category.
Convert your group to a supergroup and enable "Topics" in group settings.
In any topic thread, send /key. You'll receive a unique API key for that specific topic.
Messages sent with a topic's API key will appear only in that topic thread!
Send critical alerts to a "Production" topic while keeping dev notifications separate
Auto-send analytics, metrics, or reports to a dedicated "Reports" topic
Route application errors to a "Bugs" or "Errors" topic for easy tracking
Notify team about deployments in a "CI/CD" topic
Forward customer inquiries to a "Support" topic in your team channel
Get instant notifications for new orders in a "Sales" topic
Copy-paste ready code for instant integration
import requests
def send_text_message(message: str) -> None:
url = 'https://t69.me'
api_key = "your-api-key-here" # Replace with your actual API key
# Recommended: Use X-API-Key header
headers = {
'X-API-Key': api_key
}
data = {
'message': message
}
response = requests.post(url, json=data, headers=headers)
if response.status_code == 200:
print("✅ Message sent successfully!")
else:
print(f"❌ Failed: {response.text}")
# Example usage:
send_text_message("Hello from MessageGateBot!")
send_text_message("Bold and italic text")
send_text_message("Visit: Example")
# Method 1: Using X-API-Key header (Recommended)
curl -X POST https://t69.me \
-H "X-API-Key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{"message": "🚨 Alert: CPU usage is 95%"}'
# Method 2: Using Authorization Bearer header (Also recommended)
curl -X POST https://t69.me \
-H "Authorization: Bearer your-api-key-here" \
-H "Content-Type: application/json" \
-d '{"message": "✅ Deployment successful!"}'
import requests
def send_photo(image_path: str, caption: str = "") -> None:
url = 'https://t69.me'
api_key = "your-api-key-here"
# Recommended: Use X-API-Key header
headers = {
'X-API-Key': api_key
}
with open(image_path, 'rb') as photo:
files = {'file': photo}
data = {
'message': caption,
'file_type': 'photo'
}
response = requests.post(url, data=data, files=files, headers=headers)
if response.status_code == 200:
print("✅ Photo sent successfully!")
else:
print(f"❌ Failed: {response.text}")
# Example usage:
send_photo('screenshot.png', 'Check this out!')
send_photo('chart.jpg', 'Q4 Report\nRevenue: $1.2M')
import requests
def send_document(file_path: str, caption: str = "") -> None:
url = 'https://t69.me'
api_key = "your-api-key-here"
# Recommended: Use X-API-Key header
headers = {
'X-API-Key': api_key
}
with open(file_path, 'rb') as document:
files = {'file': document}
data = {
'message': caption,
'file_type': 'document'
}
response = requests.post(url, data=data, files=files, headers=headers)
if response.status_code == 200:
print("✅ Document sent successfully!")
else:
print(f"❌ Failed: {response.text}")
# Example usage:
send_document('report.pdf', 'Monthly Report - Dec 2024')
send_document('data.csv', 'Sales Data\nQ4 2024')
send_document('backup.zip', 'Backup completed')
Create beautiful, formatted messages with HTML tags
inline codemessage = """
<b>Server Alert</b> 🚨
<u>Server Status:</u> <code>CRITICAL</code>
<u>Instance:</u> <i>web-server-01</i>
<b>Resource Usage:</b>
• CPU: <b>95%</b> ⚠️
• Memory: <b>87%</b> ⚠️
• Disk: <s>78%</s> → <b>92%</b> 🔴
<b>Action Required:</b>
Review the <a href="https://monitoring.example.com">monitoring dashboard</a>
<pre>
Error Log:
disk space critical
swap usage high
</pre>
"""
send_text_message(message)
Complete API documentation
The API supports three methods for passing your API key (in priority order):
X-API-Key: your-api-key-here
Authorization: Bearer your-api-key-here
api_key: your-api-key-here
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key |
String | ✅ Yes | Your API key from @MessageGateBot (via header or body) |
message |
String | ✅ Yes | Message text or caption (HTML supported) |
file |
File | ❌ No | File to upload (photo/document) |
file_type |
String | ⚠️ If file | "photo" or "document" |
{
"status": "success"
}
Join thousands of developers using MessageGateBot