<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Marylynroundy on Medium]]></title>
        <description><![CDATA[Stories by Marylynroundy on Medium]]></description>
        <link>https://medium.com/@marylynroundy?source=rss-18ae6c346283------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*VNeb6d6ZurvFdtbl</url>
            <title>Stories by Marylynroundy on Medium</title>
            <link>https://medium.com/@marylynroundy?source=rss-18ae6c346283------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 03:35:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@marylynroundy/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Telegram widgets (Bot API 10.4): interactive cards inside chat messages, with a working example]]></title>
            <link>https://medium.com/@marylynroundy/telegram-widgets-bot-api-10-4-interactive-cards-inside-chat-messages-with-a-working-example-43dc6268be8c?source=rss-18ae6c346283------2</link>
            <guid isPermaLink="false">https://medium.com/p/43dc6268be8c</guid>
            <category><![CDATA[telegram]]></category>
            <category><![CDATA[telegram-bot]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Marylynroundy]]></dc:creator>
            <pubDate>Thu, 12 Nov 2026 06:19:19 GMT</pubDate>
            <atom:updated>2026-11-12T06:23:09.228Z</atom:updated>
            <content:encoded><![CDATA[<p>On November 9, Telegram shipped Bot API 10.4 with a new kind of message: <strong>widgets</strong>. A bot can now send a small interactive card that lives inside a normal chat bubble. It has buttons, it updates in place, and the buyer never leaves the chat.</p><p>I spent the last few days building three of these cards for shop bots (an order card, a rating card and a subscription card), so here is what I learned: how widgets work, the limits that matter, and a complete example you can run.</p><h3>Widgets are not Mini Apps</h3><p>Mini Apps open a full web page in a WebView. Widgets are different:</p><ul><li>A widget is <strong>one self-contained HTML document</strong> with inline CSS and JavaScript.</li><li>Telegram runs the script in a small sandboxed engine (QuickJS) and draws the result natively in the chat’s style. It is not a WebView.</li><li>It stays visible in the conversation as the user scrolls.</li><li>It cannot load anything from the internet. fetch, WebSocket and friends throw.</li></ul><p>So think “smart message”, not “app”.</p><h3>The limits that shape your design</h3><ul><li><strong>HTML size:</strong> 32,768 bytes, and at most <strong>4,096 bytes after zlib compression (level 9)</strong></li><li><strong>Per-message state (</strong><strong>chat_data):</strong> 1,024 bytes, set only by the bot</li><li><strong>Data a widget can send per tap:</strong> 1 to 64 bytes</li><li><strong>Bot answer per tap:</strong> up to 1,024 bytes, within <strong>15 seconds</strong></li><li><strong>Taps per user:</strong> 5 per 5 seconds, across all your widgets</li><li><strong>Where it works today:</strong> private chats with the bot (groups, inline mode and forwards are test-server only)</li></ul><p>Two consequences:</p><ol><li><strong>The bot owns the state.</strong> The widget cannot change its own chat_data. It asks the bot (TelegramWidget.request(...)), the bot answers, and the bot updates the message with editMessageWidgetData. The widget hears chatDataChanged and redraws.</li><li><strong>Nothing secret goes in the HTML or the state.</strong> Anyone who can see the message can read both. If a card needs to show something private, such as a license key, return it in the answer to the tap: that answer goes only to the widget that asked.</li></ol><h3>A complete example: a 1–5 rating card</h3><h3>The widget (rating.html)</h3><pre>&lt;style&gt;<br>  body { margin: 0; font: 15px system-ui; color: var(--tg-theme-text-color); }<br>  .row { display: flex; gap: 6px; padding: 12px; }<br>  button { flex: 1; border: 0; border-radius: 8px; padding: 10px; font-size: 16px;<br>           background: var(--tg-theme-secondary-bg-color); color: var(--tg-theme-button-color); }<br>  button.on { background: var(--tg-theme-button-color); color: var(--tg-theme-button-text-color); }<br>&lt;/style&gt;<br>&lt;div class=&quot;row&quot; id=&quot;row&quot;&gt;&lt;/div&gt;<br>&lt;script&gt;<br>  const W = window.TelegramWidget;<br>  const row = document.getElementById(&#39;row&#39;);<br>  function current() { try { return JSON.parse(W.chatData).stars || 0; } catch (e) { return 0; } }<br>  function draw() {<br>    row.innerHTML = &#39;&#39;;<br>    for (let i = 1; i &lt;= 5; i++) {<br>      const b = document.createElement(&#39;button&#39;);<br>      b.textContent = String(i);<br>      if (i &lt;= current()) b.className = &#39;on&#39;;<br>      // request() must be called synchronously inside the tap handler<br>      b.addEventListener(&#39;click&#39;, () =&gt; { W.request(&#39;rate:&#39; + i).catch(() =&gt; {}); });<br>      row.appendChild(b);<br>    }<br>  }<br>  W.onEvent(&#39;chatDataChanged&#39;, draw);<br>  draw(); // draw the first frame right away from the current state<br>&lt;/script&gt;</pre><p>The --tg-theme-* CSS variables come from the user&#39;s Telegram theme, so the card looks right in light and dark mode without extra work.</p><h3>The bot (Node 18+, no library needed)</h3><pre>const API = `https://api.telegram.org/bot${process.env.BOT_TOKEN}`;<br>const html = require(&#39;fs&#39;).readFileSync(&#39;rating.html&#39;, &#39;utf8&#39;);</pre><pre>async function call(method, body) {<br>  const r = await fetch(`${API}/${method}`, {<br>    method: &#39;POST&#39;,<br>    headers: { &#39;content-type&#39;: &#39;application/json&#39; },<br>    body: JSON.stringify(body),<br>  });<br>  const j = await r.json();<br>  if (!j.ok) throw new Error(`${method}: ${j.description}`);<br>  return j.result;<br>}</pre><pre>// send the card<br>async function sendRatingCard(chatId) {<br>  return call(&#39;sendWidget&#39;, {<br>    chat_id: chatId,<br>    html,<br>    chat_data: JSON.stringify({ stars: 0 }),<br>    allow_queries: true,               // without this, taps never reach the bot<br>    caption: &#39;How was your order? Tap a number to rate it.&#39;,<br>  });<br>}</pre><pre>// in your webhook handler<br>async function onUpdate(update) {<br>  const q = update.widget_query;<br>  if (!q) return;<br>  const m = /^rate:([1-5])$/.exec(q.data || &#39;&#39;);<br>  if (!m || q.type?.type !== &#39;data&#39;) {<br>    return call(&#39;answerWidgetQuery&#39;, { widget_query_id: q.id });<br>  }<br>  const stars = Number(m[1]);<br>  // save (q.from.id, q.chat.id, q.message_id, stars) in your database here<br>  await call(&#39;answerWidgetQuery&#39;, { widget_query_id: q.id, data: &#39;ok&#39; });<br>  await call(&#39;editMessageWidgetData&#39;, {<br>    chat_id: q.chat.id,<br>    message_id: q.message_id,<br>    chat_data: JSON.stringify({ stars }),<br>  });<br>}</pre><p>Note the shape of widget_query: chat and message_id sit at the top level of the query (there is no message object), and type.type is &quot;data&quot; for a normal tap.</p><h3>Things that bit me</h3><ul><li><strong>Your bot library probably drops the update.</strong> Older libraries only dispatch update types they know, so widget_query disappears silently. Handle it before the library&#39;s dispatcher, or call the API directly as above.</li><li><strong>allowed_updates.</strong> If you ever set an explicit allowed_updates list on your webhook, add widget_query to it. With the default (empty) list you receive it.</li><li><strong>Check the compressed size in CI.</strong> python3 -c &quot;import zlib,sys;print(len(zlib.compress(open(sys.argv[1],&#39;rb&#39;).read(),9)))&quot; rating.html must print 4096 or less, or sendWidget fails with INPUT_MEDIA_WIDGET_TOO_LARGE.</li><li><strong>Escape everything you render.</strong> Product names and user names end up in innerHTML if you are not careful. Escape &amp; &lt; &gt; &quot; or build nodes with textContent.</li><li><strong>Answer every query</strong>, even the ones you reject, and do it fast. Save first, answer, then edit the message.</li><li><strong>Always send a caption.</strong> It is the readable fallback, and the guide says widgets have no accessibility semantics yet.</li><li><strong>No forms.</strong> input, select and textarea are removed. Use buttons.</li><li><strong>Payments inside a widget use Telegram’s TON wallet flow</strong> (wallet.sendTransaction). Telegram Stars are not mentioned in the widget docs, so keep your normal invoice flow for Stars.</li></ul><h3>What this means for shop bots</h3><p>For anyone selling in Telegram, the obvious wins are cards that replace a stream of status messages:</p><ul><li>an <strong>order card</strong> that goes from paid to delivered in one message, with a “Show key” button that returns the key only to the buyer who tapped it;</li><li>a <strong>rating card</strong> after delivery, where a 1–2 star rating opens a support ticket instead of a public complaint;</li><li>a <strong>subscription card</strong> for paid channels with days left and a Renew button.</li></ul><p>I’m building exactly these for <a href="https://telecrow.com/">TeleCrow</a>, a no-code builder for Telegram shop and paid-channel bots, and they are in testing on our own bots right now. If you would rather write your own, the example above is everything you need to start.</p><p>Official references: <a href="https://core.telegram.org/bots/widgets">Widgets guide</a> and the <a href="https://core.telegram.org/bots/api-changelog">Bot API changelog</a>.</p><p><em>Disclosure: I work on TeleCrow.</em></p><p><em>Originally published on </em><a href="https://dev.to/marylyn_roundy_e32b126c99/telegram-widgets-bot-api-104-interactive-cards-inside-chat-messages-with-a-working-example-46j9"><em>DEV</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43dc6268be8c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to accept Telegram Stars in your bot (the full flow, plus a no-code shortcut)]]></title>
            <link>https://medium.com/@marylynroundy/how-to-accept-telegram-stars-in-your-bot-the-full-flow-plus-a-no-code-shortcut-1df215b7c86f?source=rss-18ae6c346283------2</link>
            <guid isPermaLink="false">https://medium.com/p/1df215b7c86f</guid>
            <category><![CDATA[telegram-bot]]></category>
            <category><![CDATA[telegram]]></category>
            <category><![CDATA[chatbots]]></category>
            <category><![CDATA[no-code]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Marylynroundy]]></dc:creator>
            <pubDate>Fri, 16 Oct 2026 23:39:35 GMT</pubDate>
            <atom:updated>2026-10-17T00:03:26.207Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_h9UjNVxhguLmQLv.png" /></figure><p>If your Telegram bot sells anything digital (an ebook, a course, a preset pack, access to a private channel), Telegram expects you to charge in <strong>Telegram Stars</strong>. Card providers are only allowed for physical goods. This post walks through the whole Stars payment flow with a small working example, the gotchas that cost people money, and how much you actually receive.</p><h3>Why Stars and not cards?</h3><p>Telegram’s <a href="https://core.telegram.org/bots/payments-stars">payments page for digital goods</a> is clear: digital goods and services sold inside Telegram must be paid in Stars (currency code XTR). This follows the App Store and Play Store rules. Buyers get Stars through normal in-app purchases, so paying takes two taps and they never type a card number.</p><h3>The flow in six steps</h3><ol><li>Send an invoice with sendInvoice (or make a reusable link with createInvoiceLink), using currency: &quot;XTR&quot;.</li><li>When the buyer taps <strong>Pay</strong>, you receive a pre_checkout_query update.</li><li>Approve or reject it with answerPreCheckoutQuery <strong>within 10 seconds</strong>, or the payment is cancelled.</li><li>You then receive a message containing successful_payment.</li><li>Save successful_payment.telegram_payment_charge_id, because you need it for refunds.</li><li>Deliver the product.</li></ol><p>For digital goods you don’t need a provider_token; leave it empty.</p><h3>A minimal working bot (Node 18+, no libraries)</h3><p>Save this as bot.mjs and run it with BOT_TOKEN=... node bot.mjs. It uses long polling, so you don&#39;t need a server or a webhook.</p><pre>const TOKEN = process.env.BOT_TOKEN;<br>const api = (method, body) =&gt;<br>  fetch(`https://api.telegram.org/bot${TOKEN}/${method}`, {<br>    method: &#39;POST&#39;,<br>    headers: { &#39;Content-Type&#39;: &#39;application/json&#39; },<br>    body: JSON.stringify(body),<br>  }).then((r) =&gt; r.json());<br><br>const delivered = new Set(); // use a real database in production<br><br>async function handle(update) {<br>  const msg = update.message;<br><br>  if (msg?.text === &#39;/buy&#39;) {<br>    await api(&#39;sendInvoice&#39;, {<br>      chat_id: msg.chat.id,<br>      title: &#39;Preset pack&#39;,<br>      description: &#39;12 photo presets, delivered instantly&#39;,<br>      payload: `order:${msg.from.id}:${Date.now()}`,<br>      currency: &#39;XTR&#39;,<br>      prices: [{ label: &#39;Preset pack&#39;, amount: 250 }], // 250 Stars<br>    });<br>  }<br><br>  if (update.pre_checkout_query) {<br>    // Check stock / that the order is still valid. You have 10 seconds.<br>    await api(&#39;answerPreCheckoutQuery&#39;, {<br>      pre_checkout_query_id: update.pre_checkout_query.id,<br>      ok: true,<br>    });<br>  }<br><br>  const paid = msg?.successful_payment;<br>  if (paid &amp;&amp; !delivered.has(paid.telegram_payment_charge_id)) {<br>    delivered.add(paid.telegram_payment_charge_id);<br>    await api(&#39;sendMessage&#39;, {<br>      chat_id: msg.chat.id,<br>      text: &#39;Thank you! Here is your download link: …&#39;,<br>    });<br>  }<br>}<br><br>let offset = 0;<br>for (;;) {<br>  const { result = [] } = await api(&#39;getUpdates&#39;, { offset, timeout: 30 });<br>  for (const u of result) {<br>    offset = u.update_id + 1;<br>    await handle(u).catch(console.error);<br>  }<br>}</pre><p>To refund a buyer, call:</p><pre>await api(&#39;refundStarPayment&#39;, { user_id, telegram_payment_charge_id });</pre><h3>Gotchas that cost real money</h3><ul><li><strong>Deliver only on </strong><strong>successful_payment.</strong> Answering the pre-checkout query does not mean the buyer paid.</li><li><strong>Deduplicate by </strong><strong>telegram_payment_charge_id.</strong> Network retries happen, and you don&#39;t want to deliver twice or record a sale twice.</li><li><strong>Keep the pre-checkout handler fast.</strong> Ten seconds includes your database calls. Never put slow work there.</li><li><strong>Support and terms.</strong> Telegram’s checklist asks bots that take payments to have a clear way to reach support (it mentions /paysupport) and easy access to your terms. You handle disputes and refunds yourself.</li><li><strong>Subscriptions.</strong> createInvoiceLink accepts subscription_period, which currently must be 2592000 (30 days). That&#39;s how you charge monthly for a private channel.</li><li><strong>Turn on two-step verification</strong> on the Telegram account that owns the bot. Telegram recommends it, and it’s needed when you withdraw Stars.</li></ul><h3>How much do you actually receive?</h3><p>Buyers pay Apple or Google prices for Stars, and the app stores take their cut. When you withdraw through <a href="https://fragment.com/">Fragment</a>, Telegram’s rate is about <strong>$0.013 per Star</strong>, paid in TON, and new Stars can only be withdrawn after a holding period.</p><p>In practice:</p><ul><li>At <strong>50 Stars per $1</strong> (a common default), you receive about <strong>$0.65 per dollar</strong> of list price.</li><li>To receive about <strong>$1 per dollar</strong>, price at roughly <strong>77 Stars per $1</strong>.</li></ul><h3>The no-code shortcut</h3><p><em>Disclosure: I’m part of the team building TeleCrow.</em></p><p>If you’d rather not run and maintain the code above, <a href="https://telecrow.com/">TeleCrow</a> is a no-code dashboard for this kind of bot. You connect your own bot’s token from BotFather and turn on Stars in a few taps. The Stars go to <strong>your own bot’s balance</strong>, and you withdraw them on Fragment yourself. TeleCrow handles:</p><ul><li>shops with automatic file delivery;</li><li>paid channels and groups with expiry, renewal reminders, trials and promo codes.</li></ul><p>There’s a free plan, and TeleCrow takes 0% commission on sales.</p><p>Either way, the flow above is what happens under the hood. If you build it yourself, get the six steps and the gotchas right and Stars become a very smooth checkout.</p><p><em>Originally published at </em><a href="https://dev.to/marylyn_roundy_e32b126c99/how-to-accept-telegram-stars-in-your-bot-the-full-flow-plus-a-no-code-shortcut-2pa2"><em>https://dev.to</em></a><em> on October 16, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1df215b7c86f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Make Money on Telegram in 2026: The No-Code Playbook]]></title>
            <link>https://medium.com/@marylynroundy/how-to-make-money-on-telegram-in-2026-the-no-code-playbook-598930e5bc44?source=rss-18ae6c346283------2</link>
            <guid isPermaLink="false">https://medium.com/p/598930e5bc44</guid>
            <category><![CDATA[telegram]]></category>
            <category><![CDATA[telegram-bot]]></category>
            <category><![CDATA[creator-economy]]></category>
            <category><![CDATA[make-money-online]]></category>
            <category><![CDATA[no-code]]></category>
            <dc:creator><![CDATA[Marylynroundy]]></dc:creator>
            <pubDate>Wed, 07 Oct 2026 10:28:09 GMT</pubDate>
            <atom:updated>2026-10-07T10:28:09.773Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mYnZ_2EI5OnSGVysr16a4Q.png" /></figure><p>Telegram isn’t just a messaging app anymore — it has quietly become one of the most profitable platforms on the internet. With more than a billion monthly active users, around 500 million people opening it every single day, and roughly 2.5 million new sign-ups every 24 hours, the audience is enormous. And for the first time, the money is built right into the app.</p><p>The only thing that used to stand between a creator and a working sales machine was a developer. In 2026, that barrier is gone. This is your no-code playbook for turning a Telegram channel into real income this year.</p><h3>Why Telegram is a money machine in 2026</h3><p>Two things make a platform worth monetizing: a huge, engaged audience and a frictionless way to get paid. Telegram now has both. More than a billion people use it every month, about half a billion open it daily, and the user base keeps climbing by millions every week.</p><p>What changed the game is native payments. With Telegram Stars, users buy an in-app currency and spend it on digital content without ever leaving the chat. Creators can run Star subscriptions, lock premium photos and videos behind a paywall, and accept paid Star reactions as tips. Add paid channel subscriptions, connected card processors, and a 50% ad-revenue share for public channels over 1,000 subscribers, and you have an ecosystem built to move money.</p><p>The engine that ties it all together is the bot: your 24/7 storefront, cashier, and support desk. It can take an order at 3 a.m., deliver the file instantly, confirm the payment, and follow up a week later — all on autopilot.</p><h3>Six ways to make money on Telegram right now</h3><ol><li>Sell digital products on autopilot. E-books, templates, presets, Notion dashboards, trading guides, design packs — digital products are the cleanest income on Telegram because there’s no inventory and no shipping. A buyer taps, pays, and the file lands in their chat within seconds, any hour of the day, while you keep selling the same product forever.</li><li>Run a paid subscription channel. Recurring revenue beats one-off sales every time. If you post signals, premium analysis, or members-only content, a subscription bot gates your private channel and bills members monthly, approving new subscribers automatically and removing anyone whose payment lapses, with no manual list management.</li><li>Build sales funnels that run themselves. Most people who find you aren’t ready to buy on the first message. An autofunnel warms them up: a welcome, a piece of free value a day later, a case study after that, then an offer with a deadline. Done by hand it’s exhausting; automated, it runs for every single lead, forever.</li><li>Launch your own AI assistant and charge for it. Monetizable AI agents are one of 2026’s biggest trends, and Telegram is a perfect home for them. Spin up a niche AI bot — a copywriting coach, a language tutor, a diet planner — powered by models like OpenAI or Claude, then put it behind Stars or a subscription. People happily pay for an assistant that lives in the app they already open dozens of times a day.</li><li>Grow fast with viral giveaways. Every method above needs one thing first: an audience. Giveaway bots are the fastest honest way to build one. Entrants earn extra chances by inviting friends and joining your channel, so each participant becomes a recruiter — and you walk away with thousands of new, relevant subscribers.</li><li>Monetize a file library or paid community. Sitting on a library of resources — stock assets, sample packs, course files? A file-delivery bot turns it into a searchable, paywalled vault members unlock on demand. Pair it with a paid group for coaching and peer support, and you’ve built a community product with far higher engagement and retention than a one-way channel.</li></ol><h3>Why most people never start — and what changed</h3><p>Look back at those six methods and they all depend on the same thing: automation. And automation used to mean hiring a developer, learning the Telegram Bot API, renting a server, and babysitting the whole thing so it didn’t crash mid-launch. That cost and complexity is exactly why most people with a great channel never monetize it — they stall at the technical step and the idea dies in the drafts.</p><p>The 2026 shift is simple: you no longer need to code, host, or maintain anything. No-code bot builders have collapsed weeks of development into a single afternoon.</p><h3>Launch any of these in minutes with TeleCrow</h3><p><a href="https://telecrow.com/">TeleCrow</a> is a no-code platform for creating and hosting Telegram bots — no programming, no servers, no maintenance. Every method in this playbook maps to a ready-made template, so you’re not starting from a blank screen. You’re starting from a bot that already knows how to sell, subscribe, or deliver, and simply making it yours.</p><p>It takes three steps. Create a bot in Telegram and paste its token into TeleCrow. Pick the template that matches your goal — Digital Product, Subscription, Autofunnel, AI, Giveaway, or File — and customize it in the drag-and-drop editor. Then connect payments, publish, and your bot goes live, selling and supporting customers around the clock.</p><p>Best of all, TeleCrow takes 0% commission on everything you sell. Plans start free and go up to the Ultra plan at $11.99 a month, so your margins stay yours.</p><h3>The bottom line</h3><p>Your channel is already an audience. In 2026, the tools to turn it into a business are finally simple enough for anyone to use. Pick one method, launch one bot, and let it run. Ready to build? Start free at <a href="https://telecrow.com/">telecrow.com</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=598930e5bc44" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>