Urgent.News

What's breaking now, across thousands of outlets.

Tech

Telegram Bot vs Telegram Scraper: Which One You Actually Need (No API Key Required)

A "Telegram bot" and a "Telegram scraper" solve the same request — get me the messages in this channel — with opposite architectures. After shipping a poller that has collected thousands of messages from public channels, here is the honest comparison, including the part nobody puts in tutorials: the bot API is not free for your use case. The Bot API path You register a bot with @botfather , get a…

Telegram bots and scrapers both serve the same purpose - retrieving messages from a Telegram channel - but they have different architectures and requirements. After collecting thousands of messages from public channels, we can provide a detailed comparison, including the often overlooked aspects of using the bot API.

To use the bot API, you must register your bot through @botfather, obtain a token, and add it as an admin to the channel. You can then call TelegramClient, telethon, or pyrogram to interact with the channel. However, this approach is not free for your use case, as you must ask the channel owner to add an anonymous bot admin for channels you do not own. This process can be time-consuming and may not be feasible for scaling to 100s of channels.

On the other hand, the public-preview path allows you to access the channel's history without any API key, bot, or phone verification. You can access the last ~20 messages by visiting https://t.me/s/channel. This endpoint provides a simple way to page through history using ?before= msg_id and ?after= msg_id parameters. While it lacks some features of the bot API, it offers zero-friction onboarding and access to full history for channels you own or can add a bot admin to.

The decision between these two methods depends on your specific use case. If you need to access channels you own or can get added as an admin, the bot API is the right tool. It provides full history on demand, media, member counts, and instant push notifications. However, if you need to access external channels or scale to many channels, the preview scraper is a more practical choice. It offers zero-friction onboarding and access to full history for channels you can reach.

One common pitfall people encounter is the admin-rights wall for external channels, leading them to believe that Telegram scraping is impossible. In reality, the public-preview scraper provides a free alternative that can handle this challenge. The key is to understand the limitations of each method and choose the one that best fits your needs.

In practice, I have implemented the preview path in production on my Telegram OSINT projects. I use deduplication on forward-trees, a six-column schema, and a diff-based delivery system to ensure subscribers only receive new content. The entire pipeline, including polling configurations, is available in the Telegram OSINT Sample Brief and the Telegram & Web OSINT Bundle. If you have any questions about the flood limits or implementation specifics, feel free to ask in the comments.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Proved, Certified, Swept, Sampled

A claim in a paper can be backed by very different things. It can have a written proof. It can have a theorem the Lean kernel has checked.

  • Claims can be backed up by written proofs, verified theorems, certificates, or sampling
  • Sampling ten million configurations failing to break a claim is less reliable than other methods

Generating a Zod schema from an API response sample, and what a sample can’t tell you

Disclosure: I built the converter used in this post. The Zod code below is useful without it. TypeScript types disappear at runtime. const user: User = await res.json() checks nothing.

  • Single API response sample may not capture all schema variations
  • Generated Zod schema handles union types from multiple order schemas
  • Sample confirms data types but may not represent all possible formats

European Law for .NET Developers: What the GDPR Means for Your Code

Hey lovely readers, The GDPR has been around since 2018, and most of us have heard of it. But when I ask developers what it actually means for the code they write, they often don't know.

  • GDPR protects EU personal data in code, including names, email addresses, and IP addresses.
  • Special categories of data, like health and genetic data, have stricter processing rules.
  • Violations of GDPR can result in fines up to 20 million euros or 4% of global revenue.

More from Saturday 10 October →