mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2024-11-25 08:47:37 +01:00
147 lines
8.9 KiB
HTML
147 lines
8.9 KiB
HTML
|
<!DOCTYPE html>
|
|||
|
<html class="">
|
|||
|
<head>
|
|||
|
<meta charset="utf-8">
|
|||
|
<title>Sponsored messages</title>
|
|||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|||
|
<meta property="description" content="Related TL schema:
|
|||
|
sponsoredMessage flags:# random_id:bytes from_id:Peer channel_post:flags.2?int start_param:flags.0?string…">
|
|||
|
<meta property="og:title" content="Sponsored messages">
|
|||
|
<meta property="og:image" content="">
|
|||
|
<meta property="og:description" content="Related TL schema:
|
|||
|
sponsoredMessage flags:# random_id:bytes from_id:Peer channel_post:flags.2?int start_param:flags.0?string…">
|
|||
|
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
|
|||
|
|
|||
|
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
|
|||
|
|
|||
|
<link href="/css/telegram.css?215" rel="stylesheet" media="screen">
|
|||
|
<style>
|
|||
|
</style>
|
|||
|
</head>
|
|||
|
<body class="preload">
|
|||
|
<div class="dev_page_wrap">
|
|||
|
<div class="dev_page_head navbar navbar-static-top navbar-tg">
|
|||
|
<div class="navbar-inner">
|
|||
|
<div class="container clearfix">
|
|||
|
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
|
|||
|
<ul class="nav navbar-nav">
|
|||
|
<li><a href="//telegram.org/">Home</a></li>
|
|||
|
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
|
|||
|
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
|
|||
|
<li class="active"><a href="/api">API</a></li>
|
|||
|
<li class=""><a href="/mtproto">Protocol</a></li>
|
|||
|
<li class=""><a href="/schema">Schema</a></li>
|
|||
|
</ul>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="container clearfix">
|
|||
|
<div class="dev_page">
|
|||
|
<div id="dev_page_content_wrap" class=" ">
|
|||
|
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/sponsored-messages" >Sponsored messages</a></li></ul></div>
|
|||
|
<h1 id="dev_page_title">Sponsored messages</h1>
|
|||
|
|
|||
|
<div id="dev_page_content"><p>Related TL schema:</p>
|
|||
|
<pre><code>sponsoredMessage flags:# random_id:bytes from_id:Peer channel_post:flags.2?int start_param:flags.0?string message:string entities:flags.1?Vector<MessageEntity> = SponsoredMessage;
|
|||
|
messages.sponsoredMessages messages:Vector<SponsoredMessage> chats:Vector<Chat> users:Vector<User> = messages.SponsoredMessages;
|
|||
|
|
|||
|
---functions---
|
|||
|
|
|||
|
channels.getSponsoredMessages channel:InputChannel = messages.SponsoredMessages;
|
|||
|
channels.viewSponsoredMessage channel:InputChannel random_id:bytes = Bool;</code></pre>
|
|||
|
<h4><a class="anchor" name="getting-sponsored-messages" href="#getting-sponsored-messages"><i class="anchor-icon"></i></a>Getting sponsored messages</h4>
|
|||
|
<p>Each time the user opens a channel, <code>channels.getSponsoredMessages</code> must be called to receive <a href="https://promote.telegram.org">sponsored messages</a> available for this channel. The result must be cached for <strong>5 minutes</strong>.</p>
|
|||
|
<blockquote>
|
|||
|
<p><a href="https://t.me/durov/172">More about sponsored messages on Telegram</a></p>
|
|||
|
</blockquote>
|
|||
|
<h4><a class="anchor" name="displaying-sponsored-messages" href="#displaying-sponsored-messages"><i class="anchor-icon"></i></a>Displaying sponsored messages</h4>
|
|||
|
<p>Sponsored messages must be displayed below all other posts in the channel, after the user scrolls futher down, past the last message. The promoted channel or bot specified in the <code>from_id</code> field must be displayed as the author of the message. The message should also contain one of the following buttons at the bottom:</p>
|
|||
|
<ul>
|
|||
|
<li><mark><strong>View Bot</strong></mark> — if a bot is being promoted. Tapping the button must open the chat with the bot. If <code>start_param</code> is specified, the app must use the <a href="/bots#deep-linking">deep linking mechanism</a> to open the bot.</li>
|
|||
|
<li><mark><strong>View Channel</strong></mark> — if a channel is being promoted. Tapping the button must open the channel.</li>
|
|||
|
<li><mark><strong>View Post</strong></mark> — if a channel is being promoted and <code>channel_post</code> is specified. Tapping the button must open the particular channel post.</li>
|
|||
|
</ul>
|
|||
|
<h4><a class="anchor" name="counting-sponsored-message-views" href="#counting-sponsored-message-views"><i class="anchor-icon"></i></a>Counting sponsored message views</h4>
|
|||
|
<p>Once the entire text is shown on the screen (excluding the button), <code>channels.viewSponsoredMessage</code> must be called with the <code>random_id</code> of this sponsored message.</p>
|
|||
|
<h4><a class="anchor" name="testing-sponsored-messages" href="#testing-sponsored-messages"><i class="anchor-icon"></i></a>Testing sponsored messages</h4>
|
|||
|
<p>For the channel <a href="https://t.me/SecretAdTestChannel"><a href="https://t.me/SecretAdTestChannel">https://t.me/SecretAdTestChannel</a></a> the system will <strong>always</strong> return a sponsored message: promoting either a channel, a particular message in a channel, or a bot with a start parameter.</p>
|
|||
|
<hr>
|
|||
|
<h4><a class="anchor" name="sponsored-messages-in-third-party-apps" href="#sponsored-messages-in-third-party-apps"><i class="anchor-icon"></i></a>Sponsored messages in third-party apps</h4>
|
|||
|
<p>Telegram continues to grow worldwide, in part thanks to third-party apps using the Telegram API. To cover the increasing costs that come with this growth, Telegram added <a href="https://promote.telegram.org">sponsored messages</a> – a paid <a href="https://t.me/durov/172">privacy-friendly way</a> to promote <strong>bots and channels</strong>. </p>
|
|||
|
<p>If their app allows its users to <strong>access content from Telegram channels</strong>, third-party developers using the Telegam API are required to support and properly display official sponsored messages in their apps by <strong>January 1, 2022</strong>. Unfortunately, Telegram cannot financially sustain third-party apps that do not display sponsored messages and they will have to be disconnected. </p>
|
|||
|
<p>Telegram's API usage will continue to be <strong>free of charge</strong> for all developers. The <a href="https://core.telegram.org/api/terms#3-advertising-amp-monetization">rules</a> regarding monetization in third-party apps remain the same: developers are allowed to monetize their coding efforts through advertising of their own or other legitimate means, provided that all the methods of monetization used in their apps are prominently mentioned in their app store descriptions.</p>
|
|||
|
</div>
|
|||
|
|
|||
|
</div>
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="footer_wrap">
|
|||
|
<div class="footer_columns_wrap footer_desktop">
|
|||
|
<div class="footer_column footer_column_telegram">
|
|||
|
<h5>Telegram</h5>
|
|||
|
<div class="footer_telegram_description"></div>
|
|||
|
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
|
|||
|
</div>
|
|||
|
|
|||
|
<div class="footer_column">
|
|||
|
<h5><a href="//telegram.org/faq">About</a></h5>
|
|||
|
<ul>
|
|||
|
<li><a href="//telegram.org/faq">FAQ</a></li>
|
|||
|
<li><a href="//telegram.org/blog">Blog</a></li>
|
|||
|
<li><a href="//telegram.org/jobs">Jobs</a></li>
|
|||
|
</ul>
|
|||
|
</div>
|
|||
|
<div class="footer_column">
|
|||
|
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
|
|||
|
<ul>
|
|||
|
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
|
|||
|
<li><a href="//telegram.org/dl/android">Android</a></li>
|
|||
|
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
|
|||
|
</ul>
|
|||
|
</div>
|
|||
|
<div class="footer_column">
|
|||
|
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
|
|||
|
<ul>
|
|||
|
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
|
|||
|
<li><a href="//macos.telegram.org/">macOS</a></li>
|
|||
|
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
|
|||
|
</ul>
|
|||
|
</div>
|
|||
|
<div class="footer_column footer_column_platform">
|
|||
|
<h5><a href="/">Platform</a></h5>
|
|||
|
<ul>
|
|||
|
<li><a href="/api">API</a></li>
|
|||
|
<li><a href="//translations.telegram.org/">Translations</a></li>
|
|||
|
<li><a href="//instantview.telegram.org/">Instant View</a></li>
|
|||
|
</ul>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="footer_columns_wrap footer_mobile">
|
|||
|
<div class="footer_column">
|
|||
|
<h5><a href="//telegram.org/faq">About</a></h5>
|
|||
|
</div>
|
|||
|
<div class="footer_column">
|
|||
|
<h5><a href="//telegram.org/blog">Blog</a></h5>
|
|||
|
</div>
|
|||
|
<div class="footer_column">
|
|||
|
<h5><a href="//telegram.org/apps">Apps</a></h5>
|
|||
|
</div>
|
|||
|
<div class="footer_column">
|
|||
|
<h5><a href="/">Platform</a></h5>
|
|||
|
</div>
|
|||
|
<div class="footer_column">
|
|||
|
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<script src="/js/main.js?43"></script>
|
|||
|
|
|||
|
<script>backToTopInit("Go up");
|
|||
|
removePreloadInit();
|
|||
|
</script>
|
|||
|
</body>
|
|||
|
</html>
|
|||
|
|