messages.getSponsoredMessages #

Get a list of sponsored messages for a peer, see here » for more info.

Layer 223

messages.sponsoredMessages#ffda656d flags:# posts_between:flags.0?int start_delay:flags.1?int between_delay:flags.2?int messages:Vector<SponsoredMessage> chats:Vector<Chat> users:Vector<User> = messages.SponsoredMessages;
messages.sponsoredMessagesEmpty#1839490f = messages.SponsoredMessages;
---functions---
messages.getSponsoredMessages#3d6ce850 flags:# peer:InputPeer msg_id:flags.0?int = messages.SponsoredMessages;

Parameters #

NameTypeDescription
flags#Flags, see TL conditional fields
peerInputPeerThe currently open channel/bot.
msg_idflags.0?intMust be set when fetching sponsored messages to show on channel videos ».

Result #

messages.SponsoredMessages

Only users can use this method #

Possible errors #

CodeTypeDescription
400CHANNEL_INVALIDThe provided channel is invalid.
400CHANNEL_PRIVATEYou haven't joined this channel/supergroup.
400MESSAGE_ID_INVALIDThe provided message id is invalid.
400MSG_ID_INVALIDInvalid message ID provided.

How clients should fetch, display and interact with sponsored messages.