channels.restrictSponsoredMessages

Disable ads on the specified channel, for all users.

Available only after reaching at least the boost level » specified in the channel_restrict_sponsored_level_min » config parameter.

 Method schema is available as of layer 177. Switch »

Parameters

Name Type Description
channel InputChannel The channel.
restricted Bool Whether to disable or re-enable ads.

Result

Updates

Possible errors

Code Type Description
400 CHANNEL_INVALID The provided channel is invalid.

Related pages

Channel and supergroup boosts

Telegram Premium users can grant their favorite channels and supergroups additional features like the ability to post stories by giving them boosts.

Client configuration

The MTProto API has multiple configuration parameters that can be fetched with the appropriate methods.