integrations/Article

Telegram Developer Guide

3 min read 310 views Share

What is this?

Connect a Telegram Bot to Dexra to support customers on one of the world’s fastest-growing messaging apps. It’s perfect for crypto communities, tech-savvy audiences, and markets where Telegram is dominant.


Developer Documentation

Technical details on Bot API integration and identity management.

1. Telegram Channel Overview

Dexra integrates via the Telegram Bot API. It allows two-way messaging between Telegram users and your team.

  • No Session Limits: Unlike WhatsApp, Telegram allows you to reply to a user at any time after they initiate the conversation.
  • Rich Media: Supports photos, videos, files, and stickers.

2. Message Flow

  1. User messages your bot (@YourBot).
  2. Telegram pushes update to Dexra.
  3. Dexra processes message and triggers message_in webhook.
  4. Agent replies → Dexra calls Telegram API → User gets message.

3. User Identity

Telegram users are identified by a numeric Telegram User ID. They may have a username, but they do not expose their phone number or email by default.

Best Practice: Treat Telegram users as anonymous initially. Use a chatbot flow to ask for their email address if you need to link them to a CRM profile.

4. Webhook Payload

{
“event”: “message_in”,
“channel”: “telegram”,
“data”: {
“conversation_id”: “TG_445566”,
“user”: {
“id”: “TG_123456”,
“username”: “dev_user”
},
“message”: {
“content”: “/start”,
“type”: “text”
}
}
}

5. Automation

Since Telegram has no 24h window, it is an excellent channel for automated follow-ups (e.g., “Did you resolve your issue?”) sent days later.

Was this article helpful?