Founder & Lead Engineer, RAITHub
On WhatsApp, you can reply freely for 24 hours after a learner messages you; outside that window you may send only pre-approved template messages, which Meta has charged per message since 1 July 2025. Telegram bots message users for free by default but cannot start a conversation. Build one tutor core, treat each chat app as a thin adapter, and keep a PWA for anything long or visual.
If you would rather have the channels built for you, see how RAITHub would build this below.
This post is for EdTech founders and product teams who want lessons, quizzes, reminders or AI tutoring to reach learners inside the chat apps they already use. RAITHub built PadhAI, an AI tutoring platform that runs on a progressive web app (PWA), WhatsApp and Telegram, so this is written from doing it. Platform rules come from Meta's and Telegram's own documentation, checked on 2 October 2026. One note on scope: RAITHub builds web apps, PWAs and chat integrations, not native iOS or Android apps.
Can you really teach a course over WhatsApp or Telegram?
Yes, for short, frequent, text-first learning: daily micro-lessons, spaced-repetition quizzes, homework reminders, and a tutor that answers questions in the chat. Chat is weak at long reading, diagrams, video lessons with progress tracking, and anything a learner needs to scroll back through in order. The products that work treat chat as the front door and the habit loop, not the whole classroom.
| Learning task | Telegram | PWA | |
|---|---|---|---|
| Daily micro-lesson (a few paragraphs) | Good, inside the window or as a template | Good | Good |
| Multiple-choice quiz | Interactive buttons or lists | Native quiz-mode polls | Full control |
| AI tutor conversation | Good once the learner writes first | Good | Good, with richer formatting |
| Long reading, diagrams, maths notation | Weak | Weak; Mini Apps help | Strong |
| Proactive reminder to a quiet learner | Template message only, paid | Only if the learner has started the bot | Web push, if granted |
| Payments and account settings | Hand off to the web | Hand off, or a Mini App | Native home for it |
How does the WhatsApp 24-hour window work for lessons and tutoring?
When a learner sends your business a message, a 24-hour customer service window opens, and during it you can send any message type (WhatsApp pricing). Outside it, Meta is explicit: "Template messages are the only type of message that can be sent to WhatsApp users outside of a customer service window" (Template fundamentals). Templates are reviewed automatically when you create or edit them, and can be sent once approved.
What that means for course design:
- Make the learner write first. End each lesson with a question that invites a reply. Every reply reopens the window for another 24 hours, so an engaged learner costs you almost nothing.
- Use templates for the nudge, not the lesson. A short utility template such as "Your Tuesday algebra practice is ready. Reply START" brings a quiet learner back; the lesson then flows free-form inside the new window.
- Track the window per learner. Store the time of each learner's last inbound message. Your sender must check it and fall back to a template when the window has closed, or the send will fail.
What does WhatsApp learning cost per message or per learner?
Meta moved from per-conversation to per-message pricing on 1 July 2025, and "you are only charged when a template message is delivered". Non-template messages are free inside an open window, utility templates delivered inside an open window are free, and service conversations have been free for all businesses since 1 November 2024 (WhatsApp pricing). Template rates vary by category (marketing, utility, authentication) and by the learner's country, published as downloadable rate cards on the same page.
If you connect through a business solution provider (BSP) rather than Meta's Cloud API directly, add its fee. Twilio, for example, states "Twilio's per-message fee for WhatsApp is $0.005, inbound or outbound", on top of Meta's charges (Twilio WhatsApp pricing).
| Cost line | WhatsApp Business Platform | Telegram Bot API | PWA |
|---|---|---|---|
| Replying to a learner who just wrote | Free (non-template, inside the window) | Free | Your hosting only |
| Reminder to a quiet learner | One paid template message, priced by country and category | Free, if the learner started the bot | Web push, no per-message platform fee |
| Bulk send to a whole cohort | Templates, each one charged | Free up to about 30 messages a second; paid broadcasts above that | Web push |
| Provider fee | None on the Cloud API direct; a BSP adds its own | None | None |
Telegram figures from the Telegram Bots FAQ: "By default, bots are able to message their users at no cost"; broadcasts above about 30 messages a second need paid broadcasts, at 0.1 Stars per message over the free amount. The practical design rule on WhatsApp: your bill depends on how many reminders you send to learners who have gone quiet, so measure that number from the first week.
How do Telegram bots handle lessons and quizzes?
Telegram is simpler and free, with one hard rule: "Bots can't start conversations with users. A user must either add them to a group or send them a message first" (Telegram bots). Once a learner has pressed Start, you can message them at any time, within the rate limits.
- Delivery. Receive updates through a webhook or by polling with getUpdates; the two are mutually exclusive. When you set a webhook with a secret token, Telegram sends it back in the X-Telegram-Bot-Api-Secret-Token header, so you can reject forged requests (Telegram Bot API).
- Quizzes. The sendPoll method supports a quiz mode with a correct answer and an explanation shown for wrong answers, which suits spaced-repetition drills (sendPoll).
- Length. A text message is limited to 4,096 characters after entity parsing, so long lessons must be split or linked (Telegram Bot API).
- Rate limits. Avoid more than one message a second to the same chat, and expect about 20 messages a minute in groups (Telegram Bots FAQ).
- Mini Apps. Telegram Mini Apps are web interfaces opened inside a bot, which is a route for richer screens without leaving the app (Telegram bots).
What does a WhatsApp and Telegram webhook look like in TypeScript?
Here is a minimal pair of Next.js route handlers. Both verify the request is genuine, then pass the text to one shared tutor function, so every channel gets the same tutor. Meta verifies your endpoint with a GET request carrying hub.mode, hub.verify_token and hub.challenge, and signs each event with an HMAC SHA-256 of the payload using your App Secret, sent in the X-Hub-Signature-256 header after "sha256=" (Meta webhooks). The send call follows Meta's text message reference; use the Graph API version your app is on.
// app/api/whatsapp/route.ts
import crypto from 'node:crypto'
import { tutorReply, alreadyHandled } from '@/lib/tutor' // shared core, one per product
const APP_SECRET = process.env.WA_APP_SECRET!
const VERIFY_TOKEN = process.env.WA_VERIFY_TOKEN!
const ACCESS_TOKEN = process.env.WA_ACCESS_TOKEN!
const PHONE_ID = process.env.WA_PHONE_NUMBER_ID!
// 1. Endpoint verification
export async function GET(req: Request) {
const p = new URL(req.url).searchParams
if (p.get('hub.mode') === 'subscribe' && p.get('hub.verify_token') === VERIFY_TOKEN) {
return new Response(p.get('hub.challenge') ?? '', { status: 200 })
}
return new Response('Forbidden', { status: 403 })
}
function validSignature(raw: string, header: string | null): boolean {
if (!header?.startsWith('sha256=')) return false
const expected = crypto.createHmac('sha256', APP_SECRET).update(raw, 'utf8').digest('hex')
const given = header.slice('sha256='.length)
return given.length === expected.length &&
crypto.timingSafeEqual(Buffer.from(given), Buffer.from(expected))
}
// 2. Incoming messages
export async function POST(req: Request) {
const raw = await req.text() // sign-check the raw body, before parsing
if (!validSignature(raw, req.headers.get('x-hub-signature-256'))) {
return new Response('Bad signature', { status: 401 })
}
const msg = JSON.parse(raw).entry?.[0]?.changes?.[0]?.value?.messages?.[0]
// Meta retries failed deliveries, so skip message ids already handled.
if (msg?.type === 'text' && !(await alreadyHandled('wa:' + msg.id))) {
// The learner just wrote, so the 24-hour window is open: a free-form reply is allowed.
const answer: string = await tutorReply('wa:' + msg.from, msg.text.body)
await fetch('https://graph.facebook.com/v25.0/' + PHONE_ID + '/messages', {
method: 'POST',
headers: { Authorization: 'Bearer ' + ACCESS_TOKEN, 'Content-Type': 'application/json' },
body: JSON.stringify({ messaging_product: 'whatsapp', to: msg.from, type: 'text', text: { body: answer } }),
})
}
return new Response('OK', { status: 200 })
}
// app/api/telegram/route.ts
import { tutorReply } from '@/lib/tutor'
const TG_API = 'https://api.telegram.org/bot' + process.env.TG_BOT_TOKEN
export async function POST(req: Request) {
// Set with setWebhook(secret_token); Telegram echoes it on every update.
if (req.headers.get('x-telegram-bot-api-secret-token') !== process.env.TG_WEBHOOK_SECRET) {
return new Response('Forbidden', { status: 401 })
}
const m = (await req.json()).message
if (m?.text) {
const answer: string = await tutorReply('tg:' + m.from.id, m.text)
await fetch(TG_API + '/sendMessage', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ chat_id: m.chat.id, text: answer.slice(0, 4096) }),
})
}
return new Response('OK')
}
In production, acknowledge the webhook first and push the tutor call onto a queue, because an AI reply can take longer than the platform is willing to wait. The channel prefix on the learner id (wa:, tg:) lets one learner record link all their channels once they verify each one.
What opt-in and consent do you need before messaging learners?
For WhatsApp, Meta requires that the learner has given you their phone number and agreed to receive messages from you, and that "businesses must clearly state that a person is opting in to receive communication from the business", name the business, and "comply with applicable law" (WhatsApp opt-in). On Telegram the learner's Start press is the conversation, but you still need consent for reminders and data use under the laws that apply to you.
- Record the opt-in. Store when, where and what wording the learner agreed to, per channel.
- Make stopping easy. Honour STOP or an unsubscribe button at once, across every channel the learner uses.
- Learners under 18. Many schools and laws require a parent's or guardian's consent for minors' data and contact; design for it before launch.
- AI tutor transcripts. Tell learners their messages are processed to generate answers, and say how long you keep them.
This is general information, not legal advice; confirm consent and data rules for your markets with your adviser.
When does a PWA beat chat for learning?
When the learning needs space, structure or state. A PWA is a website that can be installed to the home screen and work like an app. Choose it for:
- Long lessons, worked examples, maths notation and diagrams.
- Progress dashboards, course maps and anything the learner returns to in order.
- Payments, subscriptions and account settings, which chat should hand off to anyway.
- Proactive reminders without paying per template. On iPhone and iPad, web push works for web apps added to the home screen from iOS and iPadOS 16.4 (WebKit).
The strongest pattern is all three: chat for the daily habit and quick questions, the PWA for depth, one account and one tutor behind both. That is channel parity: the same learner, progress and tutor, whichever door they come in by.
Buy, build or hire?
| Option | Examples | Choose this when | Watch out for |
|---|---|---|---|
| Off-the-shelf | A Telegram channel or bot with quiz polls; WhatsApp through a provider such as Twilio with its tooling | You are testing whether learners engage in chat at all | No shared learner record, progress or tutor across channels |
| No-code or template | A bot builder connected to a spreadsheet of lessons | A fixed drip course with simple quizzes and a few hundred learners | Window and opt-in logic you cannot test; limits once AI tutoring is added |
| Custom build | Your own tutor core with WhatsApp, Telegram and PWA adapters | Tutoring or adaptive practice is the product, and progress must follow the learner across channels | Template approval, window tracking, idempotency and queues are yours to run |
| Hire a team | A studio such as RAITHub, fixed scope | You want the custom build without hiring a team first | Ask for tests on the channel logic, not just the happy path |
How long does it take to build yourself, and what goes wrong?
Our estimate: a developer comfortable with webhooks can have one channel answering with an AI tutor in 1–2 days. Making it production-ready, with approved templates, window tracking, opt-in records, a queue, retries without duplicate replies, and tests, typically takes 2–4 weeks per channel pair. The main risk of doing it yourself is the quiet failures: replies that silently fail outside the window, duplicate answers when the platform retries, and learners who receive reminders after they asked you to stop. None of these shows up in a demo. For the tutor itself, see how to build an AI tutor.
Why RAITHub for this
RAITHub built PadhAI, an AI tutoring platform that runs on a PWA, WhatsApp and Telegram with the same learning experience on each. Behind the channels: 11 services (9 Node/TypeScript, 2 Python), a Socratic tutor with math verification and retrieval-augmented generation, a 70/20/10 LLM router that keeps AI cost under control, and 9 payment gateways. RAITHub is QA-first, so window, retry and opt-in logic get automated tests, not just a manual check. The wider EdTech picture is in the EdTech software development guide.
When you don't need us
- You are testing demand. Run a Telegram channel or a manual WhatsApp group for a month first.
- Your course is a fixed drip of text and quizzes. A bot builder handles it.
- You need a native iOS or Android app. RAITHub builds web apps and PWAs only.
- You need SMS or voice at scale, or a certified vendor. RAITHub is not SOC 2 or ISO 27001 certified; we sign NDAs and DPAs and work inside your controls.
How RAITHub would build this
Scope:
- One tutor and lesson core, with WhatsApp Cloud API and Telegram Bot API adapters and a PWA front end.
- A single learner record linking channels, with progress that follows the learner.
- Window tracking, template fallback, opt-in and STOP handling, recorded per channel.
- Queued, idempotent webhook processing, with signature and secret-token checks.
- Payments and account settings in the PWA; see how to build a tutoring platform like Preply for the marketplace side.
Timeline: a fixed-scope MVP in 4–6 weeks; a larger multi-service backend in 6–12 weeks, delivered under API and backend development.
You receive: automated tests and CI, handover docs and runbooks covering template approval and webhook setup, and full IP under NDA. Learner data stays in your own cloud account; development uses synthetic data.
Next step: a free 15-minute technical audit of your channel plan, then a written fixed quote. Book the free audit, or read the EdTech industry page first.
Meta, Telegram, Twilio and WebKit sources checked on 2 October 2026.
Frequently asked questions
Can I send lessons on WhatsApp to learners who have not messaged me?
Only as approved template messages, and only to learners who opted in. Free-form messages are allowed only inside the 24-hour customer service window that opens when the learner writes to you.
How much does WhatsApp cost for an education bot?
Meta charges per delivered template message, at rates that vary by category and country. Non-template replies inside an open window are free, and so are utility templates sent inside it. A provider such as Twilio adds its own per-message fee.
Is a Telegram bot free to run?
Messaging is free by default. Broadcasting above about 30 messages a second needs paid broadcasts, at 0.1 Stars per extra message. You still pay your own hosting and any AI model costs.
Can a Telegram bot message a learner first?
No. Telegram says bots cannot start conversations; the learner must message the bot or add it to a group first. After that, the bot can send lessons and reminders.
Should I build a WhatsApp bot or a PWA for my EdTech product?
Usually both, on one backend. Chat suits daily habits and quick tutoring; a PWA suits long lessons, diagrams, progress and payments. RAITHub's PadhAI runs on a PWA, WhatsApp and Telegram.
Does RAITHub build native mobile apps for learning?
No. RAITHub builds web apps, installable PWAs and WhatsApp and Telegram integrations, not native iOS or Android apps.
Related posts
Ready to discuss your project?
Book a free 15-minute technical audit with our engineering team.