Telegram Bot API Integration into Mobile App

TRUETECH is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.
Development and support of all types of mobile applications:
Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1 servicesAll 1735 services
Telegram Bot API Integration into Mobile App
Simple
~2-3 business days
FAQ
Our competencies:
Development stages
Latest works
  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    756
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    624
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1054
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    947
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    862
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    445

Telegram Bot API Integration in Mobile Application

Telegram Bot API — simplest to integrate channel. HTTP API without SDK, documentation straightforward, sandbox not needed. But nuances: user must start dialog with bot, webhook needs HTTPS with valid cert, Telegram Web App enables mini-app within Telegram.

Sending Notifications via Bot

Minimal flow: user taps "Connect Telegram" in app, goes to bot, taps /start — bot gets chat_id, backend saves and uses for sending.

Message send:

POST https://api.telegram.org/bot{TOKEN}/sendMessage
Content-Type: application/json

{
  "chat_id": 123456789,
  "text": "Your order #98765 sent for delivery 🚚",
  "parse_mode": "HTML",
  "reply_markup": {
    "inline_keyboard": [[
      { "text": "Track", "url": "https://yourbrand.com/track/98765" },
      { "text": "Support", "callback_data": "contact_support_98765" }
    ]]
  }
}

parse_mode: "HTML" or "MarkdownV2" — formatting. HTML easier: <b>, <i>, <code>, <a href="...">.

Getting chat_id — via webhook. Backend registers webhook:

POST https://api.telegram.org/bot{TOKEN}/setWebhook
{ "url": "https://api.yourbrand.com/telegram/webhook" }

On /start from user, Telegram sends:

{
  "message": {
    "from": { "id": 123456789, "username": "user_alex" },
    "chat": { "id": 123456789 },
    "text": "/start auth_token_from_deeplink"
  }
}

/start can pass parameter via deep link https://t.me/YourBot?start=user_uuid_12345. Auto-bind chat_id to system user without extra confirmation.

Inline Keyboard and Callback Queries

Buttons in message — inline keyboard. Tap triggers callback_query to webhook:

{
  "callback_query": {
    "from": { "id": 123456789 },
    "message": { "message_id": 456, "chat": { "id": 123456789 } },
    "data": "contact_support_98765"
  }
}

After handling, must answer callback_query or button spins indefinitely:

POST https://api.telegram.org/bot{TOKEN}/answerCallbackQuery
{ "callback_query_id": "...", "text": "Connecting support..." }

Telegram Web App (TWA)

For full interface within Telegram — Telegram Web App. web_app button in keyboard opens mini-browser with your web app. Mobile app here acts as PWA or React app:

// Web App has Telegram WebApp SDK
const tg = window.Telegram.WebApp;
tg.ready();

// User data
const user = tg.initDataUnsafe.user;

// Send data to bot and close TWA
tg.sendData(JSON.stringify({ action: "order_confirmed", orderId: "98765" }));

Mobile App: Deep Link for Bot Connection

Mobile side needs "Connect Telegram" button opening Telegram with deep link. iOS and Android:

// Android
val telegramDeepLink = "https://t.me/YourBotName?start=${currentUser.id}"
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(telegramDeepLink))
startActivity(intent)
// iOS
let deepLink = "https://t.me/YourBotName?start=\(currentUser.id)"
if let url = URL(string: deepLink) {
    UIApplication.shared.open(url)
}

Telegram not installed — opens in browser, offers install or Web Telegram.

After binding backend marks user "Telegram connected" — mobile app next launch syncs status and changes button UI.

Timeline

Telegram Bot API integration, webhook handler with commands and callback queries, deep link user binding, mobile UI for bot connection — 3–5 workdays.