Telegram
Integrate with Telegram's messaging platform to engage with users through rich, interactive conversations using PantheonCloud's API.
Overview
Telegram is a globally popular messaging platform known for its speed, security, and rich feature set. With PantheonCloud's Telegram API integration, businesses can leverage this platform to connect with users through personalized and interactive messaging experiences. Whether it's customer support, notifications, or marketing campaigns, our API makes it seamless to integrate Telegram into your communication strategy.
Rich Messaging
Send photos, videos, documents, and interactive elements.
Enhanced Security
Leverage Telegram's end-to-end encryption and secure protocols.
Global Audience
Reach users worldwide with Telegram's extensive global presence.
Key Features
Bot Integration
Create and manage Telegram bots to automate conversations and customer interactions.
- Custom bot development
- Automated responses
- Command handling
- User session management
Rich Media Support
Send various types of media content to enhance user engagement.
- Photos and images
- Videos and animations
- Documents and files
- Audio messages
- Stickers and GIFs
Interactive Elements
Create engaging experiences with interactive message components.
- Inline buttons and keyboards
- Custom reply markup
- Callback queries handling
- Polls and surveys
Group and Channel Support
Manage communications in groups and broadcast channels.
- Group message broadcasting
- Channel management
- Member administration
- Moderation tools
Location Sharing
Share and receive location data within your Telegram messages.
- Single location sharing
- Live location updates
- Location-based services integration
- Geofencing capabilities
Analytics & Reporting
Track message performance and user engagement metrics.
- Message delivery reports
- User engagement statistics
- Bot interaction tracking
- Custom analytics dashboards
API Endpoints
Send Message
POSThttps://api.bitpanyun.com/v1/messages/telegram
Request Body
{
"to": "123456789",
"bot_token": "YOUR_BOT_TOKEN",
"text": "Hello from PantheonCloud!",
"parse_mode": "Markdown",
"disable_web_page_preview": false,
"reply_markup": {
"inline_keyboard": [
[
{
"text": "Visit Website",
"url": "https://www.bitpanyun.com"
},
{
"text": "Contact Support",
"callback_data": "contact_support"
}
]
]
},
"tags": {
"campaign": "welcome",
"channel": "telegram"
}
}
Response
{
"message_id": "msg-123456789",
"platform_message_id": "123456",
"to": "123456789",
"text": "Hello from PantheonCloud!",
"status": "delivered",
"created_at": "2023-07-15T10:30:00Z",
"delivered_at": "2023-07-15T10:30:01Z",
"cost": 0.002,
"currency": "USD"
}
Send Media
POSThttps://api.bitpanyun.com/v1/messages/telegram/media
Request Body
{
"to": "123456789",
"bot_token": "YOUR_BOT_TOKEN",
"media_type": "photo",
"media_url": "https://example.com/product.jpg",
"caption": "Check out our new product!",
"parse_mode": "Markdown",
"reply_markup": {
"keyboard": [
["Yes", "No"]
],
"resize_keyboard": true,
"one_time_keyboard": true
},
"tags": {
"product": "new_launch",
"campaign": "summer_sale"
}
}
Response
{
"message_id": "msg-987654321",
"platform_message_id": "654321",
"to": "123456789",
"media_type": "photo",
"media_url": "https://example.com/product.jpg",
"caption": "Check out our new product!",
"status": "delivered",
"created_at": "2023-07-15T10:30:00Z",
"delivered_at": "2023-07-15T10:30:01Z",
"cost": 0.005,
"currency": "USD"
}
Get Bot Information
GEThttps://api.bitpanyun.com/v1/telegram/bot/{bot_token}/info
Response
{
"ok": true,
"result": {
"id": 1234567890,
"is_bot": true,
"first_name": "PantheonCloud Bot",
"username": "PantheonCloudBot",
"can_join_groups": true,
"can_read_all_group_messages": false,
"supports_inline_queries": true
}
}
Error Codes
| Code | Description | Resolution |
|---|---|---|
| TELE_001 | Invalid bot token | Verify your bot token is correct and active |
| TELE_002 | Chat not found | Ensure the user has started a conversation with your bot |
| TELE_003 | Bot blocked by user | User has blocked your bot. Cannot send messages |
| TELE_004 | Message too long | Shorten your message content (max 4096 characters) |
| TELE_005 | Media file too large | Reduce file size (photos: 10MB, videos: 50MB, documents: 20MB) |
| TELE_006 | Too many requests | Reduce request rate (max 30 messages per second) |
| TELE_007 | Unauthorized | Your bot token may be invalid or your account is restricted |
| TELE_008 | Bad request | Check your request parameters and formatting |