diff --git a/data/corefork.telegram.org/api/sponsored-messages.html b/data/corefork.telegram.org/api/sponsored-messages.html new file mode 100644 index 0000000000..c618f547b5 --- /dev/null +++ b/data/corefork.telegram.org/api/sponsored-messages.html @@ -0,0 +1,136 @@ + + +
+ +Related TL schema:
+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;
+Each time the user opens a channel, channels.getSponsoredMessages
should be called to receive sponsored messages available for this channel. The result should be cached for 5 minutes.
Sponsored messages are displayed below all posts of the channel under the scroll. Promoted channel or bot specified in the from_id
field is displayed as the author of the message. The message should also contain one of these buttons at the bottom:
start_param
specified you should use deep linking mechanism to open the bot.channel_post
specified. The channel post should be opened when the user taps this button.Once the entire text is shown on the screen (excluding the button), channels.viewSponsoredMessage
should be called with the random_id
of this sponsored message.
help.getTermsOfServiceUpdate | -Look for updates of telegram's terms of service | +Look for updates of telegram's terms of service |
help.acceptTermsOfService | @@ -58,7 +58,7 @@
account.reportPeer | -Report a peer for violation of telegram's Terms of Service | +Report a peer for violation of telegram's Terms of Service |
account.reportProfilePhoto | @@ -81,7 +81,7 @@||
messages.report | -Report a message in a chat for violation of telegram's Terms of Service | +Report a message in a chat for violation of telegram's Terms of Service |
messages.reportSpam | @@ -93,7 +93,7 @@
help.getAppChangelog | -Get changelog of current app. Typically, an updates constructor will be returned, containing one or more updateServiceNotification updates with app-specific changelogs. |
+Get changelog of current app. Typically, an updates constructor will be returned, containing one or more updateServiceNotification updates with app-specific changelogs. |
help.getAppConfig | @@ -128,7 +128,7 @@||
help.getSupport | -Returns the support user for the 'ask a question' feature. | +Returns the support user for the 'ask a question' feature. |
help.getSupportName | @@ -144,7 +144,7 @@
auth.exportLoginToken | -Generate a login token, for login via QR code. The generated login token should be encoded using base64url, then shown as a tg://login?token=base64encodedtoken URL in the QR code.For more info, see login via QR code. |
+Generate a login token, for login via QR code. The generated login token should be encoded using base64url, then shown as a tg://login?token=base64encodedtoken URL in the QR code.For more info, see login via QR code. |
auth.acceptLoginToken | @@ -167,7 +167,7 @@
auth.resetAuthorizations | -Terminates all user's authorized sessions except for the current one. After calling this method it is necessary to reregister the current device using the method account.registerDevice |
+Terminates all user's authorized sessions except for the current one. After calling this method it is necessary to reregister the current device using the method account.registerDevice |
auth.sendCode | @@ -281,7 +281,7 @@
messages.getSplitRanges | -Get message ranges for saving the user's chat history | +Get message ranges for saving the user's chat history |
channels.getLeftChannels | @@ -316,7 +316,7 @@
phone.getCallConfig | -Get phone call configuration to be passed to libtgvoip's shared config | +Get phone call configuration to be passed to libtgvoip's shared config |
phone.receivedCall | @@ -498,7 +498,7 @@
channels.getAdminedPublicChannels | -Get channels/supergroups/geogroups we're admin in. Usually called when the user exceeds the limit for owned public channels/supergroups/geogroups, and the user is given the choice to remove one of his channels/supergroups/geogroups. | +Get channels/supergroups/geogroups we're admin in. Usually called when the user exceeds the limit for owned public channels/supergroups/geogroups, and the user is given the choice to remove one of his channels/supergroups/geogroups. |
channels.getChannels | @@ -577,7 +577,7 @@||
channels.getGroupsForDiscussion | -Get all groups that can be used as discussion groups. Returned legacy group chats must be first upgraded to supergroups before they can be set as a discussion group. To set a returned supergroup as a discussion group, access to its old messages must be enabled using channels.togglePreHistoryHidden, first. |
+Get all groups that can be used as discussion groups. Returned legacy group chats must be first upgraded to supergroups before they can be set as a discussion group. To set a returned supergroup as a discussion group, access to its old messages must be enabled using channels.togglePreHistoryHidden, first. |
channels.getMessages | @@ -633,7 +633,7 @@
users.setSecureValueErrors | -Notify the user that the sent passport data contains some errors The user will not be able to re-submit their Passport data to you until the errors are fixed (the contents of the field for which you returned the error must change). Use this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues. |
+Notify the user that the sent passport data contains some errors The user will not be able to re-submit their Passport data to you until the errors are fixed (the contents of the field for which you returned the error must change). Use this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues. |
help.setBotUpdatesStatus | -Informs the server about the number of pending bot updates if they haven't been processed for a long time; for bots only | +Informs the server about the number of pending bot updates if they haven't been processed for a long time; for bots only |
contacts.getContacts | -Returns the current user's contact list. | +Returns the current user's contact list. |
contacts.getLocated | @@ -1205,7 +1205,7 @@
messages.hidePeerSettingsBar | -Should be called after the user hides the report spam/add as contact bar of a new chat, effectively prevents the user from executing the actions specified in the peer's settings. | +Should be called after the user hides the report spam/add as contact bar of a new chat, effectively prevents the user from executing the actions specified in the peer's settings. |
messages.getOnlines | @@ -1283,7 +1283,7 @@
messages.startHistoryImport | -Complete the history import process, importing all messages into the chat. To be called only after initializing the import with messages.initHistoryImport and uploading all files using messages.uploadImportedMedia. |
+Complete the history import process, importing all messages into the chat. To be called only after initializing the import with messages.initHistoryImport and uploading all files using messages.uploadImportedMedia. |
messages.checkHistoryImportPeer | @@ -1513,7 +1513,7 @@
messages.getMessageEditData | -Find out if a media message's caption can be edited | +Find out if a media message's caption can be edited |
messages.getMessages | @@ -1712,7 +1712,7 @@
messages.setBotPrecheckoutResults | -Once the user has confirmed their payment and shipping details, the bot receives an updateBotPrecheckoutQuery update. Use this method to respond to such pre-checkout queries. Note: Telegram must receive an answer within 10 seconds after the pre-checkout query was sent. |
+Once the user has confirmed their payment and shipping details, the bot receives an updateBotPrecheckoutQuery update. Use this method to respond to such pre-checkout queries. Note: Telegram must receive an answer within 10 seconds after the pre-checkout query was sent. |
payments.getPaymentReceipt | @@ -1817,7 +1817,7 @@
stats.getMessagePublicForwards | -Obtains a list of messages, indicating to which other public channels was a channel message forwarded. Will return a list of messages with peer_id equal to the public channel to which this message was forwarded. |
+Obtains a list of messages, indicating to which other public channels was a channel message forwarded. Will return a list of messages with peer_id equal to the public channel to which this message was forwarded. |
stats.getMegagroupStats | @@ -1951,7 +1951,7 @@
account.deleteAccount | -Delete the user's account from the telegram servers. Can be used, for example, to delete the account of a user that provided the login code, but forgot the 2FA password and no recovery method is configured. | +Delete the user's account from the telegram servers. Can be used, for example, to delete the account of a user that provided the login code, but forgot the 2FA password and no recovery method is configured. |
account.getAccountTTL | @@ -2133,7 +2133,7 @@
Create and upload a new wallpaper |