By Admin on Thursday, 24 February 2022
Category: All

Telegram Sponsored Messages

​From sgcWebSockets 2022.3.0, Sponsored Messages are supported. Sponsored Messages requires Telegram 1.8.0+, so the Telegram libraries have been updated to support this feature.

Sponsored messages on Telegram are displayed in large public one-to-many channels with 1000+ subscribers and are limited to 160 characters. Sponsored Messages are based solely on the topic of the public channels in which they are shown.

This means that no user data is mined or analyzed to display ads, and every user viewing a particular channel on Telegram sees the same sponsored messages.

Getting sponsored messages 

 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.

Displaying sponsored messages 

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 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:

Example 

​Find below an example to request and show Sponsored Messages using sgcWebSockets library.

Related Posts