Related TL schema:
sponsoredMessage#3a836df8 flags:# recommended:flags.5?true random_id:bytes from_id:flags.3?Peer chat_invite:flags.4?ChatInvite chat_invite_hash:flags.4?string channel_post:flags.2?int start_param:flags.0?string message:string entities:flags.1?Vector<MessageEntity> = SponsoredMessage; messages.sponsoredMessages#65a4c7d5 messages:Vector<SponsoredMessage> chats:Vector<Chat> users:Vector<User> = messages.SponsoredMessages; ---functions--- channels.getSponsoredMessages#ec210fbf channel:InputChannel = messages.SponsoredMessages; channels.viewSponsoredMessage#beaedb94 channel:InputChannel random_id:bytes = Bool;
Each time the user opens a channel,
channels.getSponsoredMessages must be called to receive sponsored messages available for this channel. The result must be cached for 5 minutes.
Sponsored messages must be displayed below all other posts in the channel, after the user scrolls further down, past the last message. The promoted channel or bot specified in the
from_id field must be displayed as the author of the message. The message should also contain one of the following buttons at the bottom:
start_paramis specified, the app must use the deep linking mechanism to open the bot.
channel_postis specified. Tapping the button must open the particular channel post.
The message should be marked as "Recommended" instead of "Sponsored" if the
sponsored flag is set.
Once the entire text is shown on the screen (excluding the button),
channels.viewSponsoredMessage must be called with the
random_id of this sponsored message.
For the channel https://t.me/SecretAdTestChannel the system will always return a sponsored message: promoting either a channel, a particular message in a channel, or a bot with a start parameter.
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 sponsored messages – a paid privacy-friendly way to promote bots and channels.
If their app allows its users to access content from Telegram channels, third-party developers using the Telegram API are required to support and properly display official sponsored messages in their apps by January 1, 2022. Unfortunately, Telegram cannot financially sustain third-party apps that do not display sponsored messages and they will have to be disconnected.
Telegram's API usage will continue to be free of charge for all developers. The rules 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.