Telegram Mini Apps skill

Telegram Mini Apps is an agent skill for AI coding assistants (Claude Code, OpenClaw, Cursor, Codex). Build & ship production Telegram Mini Apps with Stars (XTR) payments on Next.js — @telegram-apps/sdk v3 (cloudStorage, biometry, fullscreen, shareStory) with isAvailable() guards, server-side initData HMAC validation, grammY bot webhooks, and serverless-safe rate limiting. Use when building, debugging, or deploying a Telegram Mini App / TWA or Stars billing. Install with: npx skills-ws install telegram-mini-apps.

devv1.11.0Updated
copied ✓
openclawclaude-codecursorcodex
0 installsSecurity scan: cleanSource code

Telegram Mini Apps with Stars Payments — Expert Skill

A production-grade reference for building Telegram Mini Apps (TWA) on Next.js: @telegram-apps/sdk v3 init, native capabilities (CloudStorage, biometry, fullscreen, shareStory), server-side initData HMAC validation, grammY bot webhooks, Stars (XTR) payments, and serverless deployment. Scope is the bot + Mini App + Stars billing stack; for advanced BotFather configuration and Bot API specifics, cross-check core.telegram.org/bots/webapps and docs.telegram-mini-apps.com.

Tested version matrix (as of Jun 2026)

These versions were verified to work together. Always confirm latest at each package's releases page before pinning.

Package / runtimePin used hereNotes
Node.js22 LTS or 24 LTSNode 18 and 20 are both EOL, do not target them for new deploys.
@telegram-apps/sdk^3v2 → v3 renamed several mount/signal APIs (see migration note below).
@telegram-apps/sdk-react^3React bindings (useSignal, useLaunchParams).
grammy^1.30Verify method signatures at grammy.dev; sendInvoice dropped positional provider_token in 1.24+ (Bot API 7.4 support).
next^15 (App Router)Next.js 16 is current — verify at nextjs.org; RSC/route-handler APIs unchanged for this skill.
react / react-dom^19
@libsql/client (Turso)^0.15Verify at github.com/tursodatabase/libsql-client-ts.
typescript^5.6+
Telegram Bot API7.x+Stars/XTR, refundStarPayment, getStarTransactions.
Telegram WebApp platform8.0+requestFullscreen, shareStory, home-screen shortcuts require 8.0+.

Do not confuse the two "versions". The npm package @telegram-apps/sdk (major v3 in mid-2026) is independent of the Telegram WebApp platform version (e.g. 8.0) reported in launch params. Older docs/skills saying "TMA SDK 7.x" conflated the two — there is no npm SDK 7.x.

Reference guide

Read only the references needed for the current request: