diff --git a/data/web/corefork.telegram.org/api/bots/webapps.html b/data/web/corefork.telegram.org/api/bots/webapps.html index 0444f2362f..f5a023de42 100644 --- a/data/web/corefork.telegram.org/api/bots/webapps.html +++ b/data/web/corefork.telegram.org/api/bots/webapps.html @@ -56,7 +56,7 @@ messageActionWebViewDataSentMe#47dd8079 text:string data:string = MessageAction; messageActionWebViewDataSent#b4c38cb5 text:string = MessageAction; -simpleWebViewResultUrl#882f76bb url:string = SimpleWebViewResult; +webViewResultUrl#4d22ff98 flags:# fullsize:flags.1?true query_id:flags.0?long url:string = WebViewResult; ---functions--- @@ -64,7 +64,7 @@ simpleWebViewResultUrl#882f76bb url:string = SimpleWebViewResult; messages.sendWebViewData#dc0242c8 bot:InputUser random_id:long button_text:string data:string = Updates;
Keyboard Button Mini Apps should be opened when the user clicks a keyboardButtonSimpleWebView contained in a reply keyboard identified by a replyKeyboardMarkup constructor, by invoking messages.requestSimpleWebView passing the button's url
to the url
parameter.
After invoking messages.requestSimpleWebView and obtaining a simpleWebViewResultUrl result, clients should open a webview using the url
contained in the returned simpleWebViewResultUrl.
After invoking messages.requestSimpleWebView and obtaining a webViewResultUrl result, clients should open a webview using the url
contained in the returned webViewResultUrl.
Keyboard Button Mini Apps can send data back to the bot through the MTProto API via a web_app_data_send
JS event ».
Upon receiving a web_app_data_send
JS event » only from Keyboard Button Mini Apps, clients should invoke messages.sendWebViewData, passing the following arguments:
Inline mode Mini Apps can be used to generate a custom set of inline results in response to a user's inline query » via a web_app_switch_inline_query
JS event ».
Inline mode Mini Apps can be opened by clicking on an inlineBotWebView button returned at the top of the inline result list, contained in messages.botResults.switch_webview
, returned by messages.getInlineBotResults.
Pass the url
to messages.requestSimpleWebView, while also setting the from_switch_webview
flag.
After invoking messages.requestSimpleWebView and obtaining a simpleWebViewResultUrl result, clients should open a webview using the url
contained in the returned simpleWebViewResultUrl.
After invoking messages.requestSimpleWebView and obtaining a webViewResultUrl result, clients should open a webview using the url
contained in the returned webViewResultUrl.
Once the user has finished making their choices in the Mini App, a web_app_switch_inline_query
JS event » should be emitted, containing a JSON object with the following fields:
query
- The inline query that will be inserted in the chat's input field, after the bot's username.Upon receiving a web_app_switch_inline_query
JS event » from the Mini App, the client should make a new inline query » to the same bot, with the newly specified query
, either in the current chat or in the newly chosen chat, as specified by the chat_types
field.
simpleWebViewResultUrl#882f76bb url:string = SimpleWebViewResult;
+webViewResultUrl#4d22ff98 flags:# fullsize:flags.1?true query_id:flags.0?long url:string = WebViewResult;
---functions---
messages.requestSimpleWebView#413a3e73 flags:# from_switch_webview:flags.1?true from_side_menu:flags.2?true compact:flags.7?true bot:InputUser url:flags.3?string start_param:flags.4?string theme_params:flags.0?DataJSON platform:string = WebViewResult;
Side menu Mini Apps can be opened by clicking on the installed side menu entry ».
-This action must trigger a messages.requestSimpleWebView query with the from_side_menu
flag set: clients should open a webview using the url
contained in the returned simpleWebViewResultUrl.
+This action must trigger a messages.requestSimpleWebView query with the from_side_menu
flag set: clients should open a webview using the url
contained in the returned webViewResultUrl.
Side menu Mini Apps can also be opened by clicking on a Mini App link »: in which case the start_parameter
should be provided to messages.requestSimpleWebView.start_param
, if present; note that in this case, the app should be opened (with an installation prompt » before, if not already installed) even if the client is minimized.
-After invoking messages.requestSimpleWebView and obtaining a simpleWebViewResultUrl result, clients should open a webview using the url
contained in the returned simpleWebViewResultUrl.
+After invoking messages.requestSimpleWebView and obtaining a webViewResultUrl result, clients should open a webview using the url
contained in the returned webViewResultUrl.
Direct Link Mini Apps
Schema:
inputBotAppID#a920bd7a id:long access_hash:long = InputBotApp;
@@ -157,7 +157,7 @@ If empty, the current chat is used.
messages.botApp#eb50adf5 flags:# inactive:flags.0?true request_write_access:flags.1?true has_settings:flags.2?true app:BotApp = messages.BotApp;
-appWebViewResultUrl#3c1b4f0d url:string = AppWebViewResult;
+webViewResultUrl#4d22ff98 flags:# fullsize:flags.1?true query_id:flags.0?long url:string = WebViewResult;
---functions---
@@ -195,7 +195,7 @@ Confirmation should always be asked, even if the inactive
-Finally, open the webview using the url
contained in the returned appWebViewResultUrl.
+Finally, open the webview using the url
contained in the returned webViewResultUrl.
Outgoing events: Mini App to client
Mini Apps can send web events starting with web_app_
; see the web event documentation for the full list of events that can be sent by the Mini App to the client ».
Incoming events: Client to Mini App
diff --git a/data/web/corefork.telegram.org/api/layers.html b/data/web/corefork.telegram.org/api/layers.html
index 2f3a6c38bc..b16591ce45 100644
--- a/data/web/corefork.telegram.org/api/layers.html
+++ b/data/web/corefork.telegram.org/api/layers.html
@@ -154,7 +154,7 @@
This layer introduces the following features:
- Fetch info about specific Telegram Star transactions »
-- Pay for advertisements using Telegram Stars »
+- Pay for advertisements using Telegram Stars »
- Device integrity verification improvements for official apps.
Schema changes
diff --git a/data/web/corefork.telegram.org/api/stars.html b/data/web/corefork.telegram.org/api/stars.html
index 2b20d59198..334aafec70 100644
--- a/data/web/corefork.telegram.org/api/stars.html
+++ b/data/web/corefork.telegram.org/api/stars.html
@@ -55,6 +55,7 @@
starsTransactionPeerPremiumBot#250dbaf8 = StarsTransactionPeer;
starsTransactionPeerFragment#e92fd902 = StarsTransactionPeer;
starsTransactionPeer#d80da15d peer:Peer = StarsTransactionPeer;
+starsTransactionPeerAds#60682812 = StarsTransactionPeer;
starsTransactionPeerUnsupported#95f2bfe4 = StarsTransactionPeer;
starsTransaction#2db5418f flags:# refund:flags.3?true pending:flags.4?true failed:flags.6?true gift:flags.10?true id:string stars:long date:int peer:StarsTransactionPeer title:flags.0?string description:flags.1?string photo:flags.2?WebDocument transaction_date:flags.5?int transaction_url:flags.5?string bot_payload:flags.7?bytes msg_id:flags.8?int extended_media:flags.9?Vector<MessageMedia> = StarsTransaction;
@@ -130,8 +131,10 @@ To return all star transactions » (
To withdraw funds from the star balance of a channel or bot we own, invoke payments.getStarsRevenueWithdrawalUrl, passing the current account's 2FA password as an InputCheckPasswordSRP constructor, generated as specified here ».
Only the channel/bot owner can invoke this method, and only if the balance is bigger than or equal to stars_revenue_withdrawal_min » and the status.withdrawal_enabled
flag returned by payments.getStarsRevenueStats is set.
The method will return a unique URL to a Fragment page where the user will be able to specify and submit the address of the TON wallet where the funds will be sent.
-Paying for ads using Telegram Stars
-payments.starsRevenueAdsAccountUrl#394e7f21 url:string = payments.StarsRevenueAdsAccountUrl;
+Paying for ads
+starsTransactionPeerAds#60682812 = StarsTransactionPeer;
+
+payments.starsRevenueAdsAccountUrl#394e7f21 url:string = payments.StarsRevenueAdsAccountUrl;
---functions---
@@ -139,7 +142,8 @@ To return all star transactions » (
Channel/bot owners may place Telegram advertisements for channels/bots they own using the Telegram Ad platform, paying using Stars at a special rate with a 30% discount – creating a cost-effective way of reaching new users.
To use Stars for ads, go to your bot's or channels' Balance or Monetization section and tap 'Buy Ads'.
Clicking on the button should invoke payments.getStarsRevenueAdsAccountUrl (passing the bot/channel in peer
).
-The returned url
will lead to a page where the user will be able to place ads for the channel/bot passed in peer
.
+The returned url
will lead to a page where the user will be able to place ads for the channel/bot passed in peer
.
+Transactions for ad payments will be of type starsTransactionPeerAds.
diff --git a/data/web/corefork.telegram.org/constructor/payments.starsRevenueAdsAccountUrl.html b/data/web/corefork.telegram.org/constructor/payments.starsRevenueAdsAccountUrl.html
index 6f5c4b9327..a93688a778 100644
--- a/data/web/corefork.telegram.org/constructor/payments.starsRevenueAdsAccountUrl.html
+++ b/data/web/corefork.telegram.org/constructor/payments.starsRevenueAdsAccountUrl.html
@@ -42,7 +42,7 @@
payments.starsRevenueAdsAccountUrl
- Contains a URL leading to a page where the user will be able to place ads for the channel/bot, paying using Telegram Stars.
+ Contains a URL leading to a page where the user will be able to place ads for the channel/bot, paying using Telegram Stars.
-
diff --git a/data/web/corefork.telegram.org/constructor/starsTransactionPeerAds.html b/data/web/corefork.telegram.org/constructor/starsTransactionPeerAds.html
index 8bb094b01a..d3e7eb5e62 100644
--- a/data/web/corefork.telegram.org/constructor/starsTransactionPeerAds.html
+++ b/data/web/corefork.telegram.org/constructor/starsTransactionPeerAds.html
@@ -4,16 +4,14 @@
starsTransactionPeerAds
-
+
-
+
@@ -48,7 +46,8 @@ StarsTransactionPeer">
starsTransactionPeerAds
-
+ Describes a Telegram Star transaction used to pay for Telegram ads as specified here ».
+
-
Layer 185
diff --git a/data/web/corefork.telegram.org/constructor/webViewResultUrl.html b/data/web/corefork.telegram.org/constructor/webViewResultUrl.html
index 949a40e734..fe75a64b3e 100644
--- a/data/web/corefork.telegram.org/constructor/webViewResultUrl.html
+++ b/data/web/corefork.telegram.org/constructor/webViewResultUrl.html
@@ -74,12 +74,12 @@
fullsize
flags.1?true
-
+If set, the app must be opened in fullsize mode instead of compact mode.
query_id
flags.0?long
-Webview session ID
+Webview session ID (only returned by inline button mini apps, menu button mini apps, attachment menu mini apps).
url
diff --git a/data/web/corefork.telegram.org/method/payments.getStarsRevenueAdsAccountUrl.html b/data/web/corefork.telegram.org/method/payments.getStarsRevenueAdsAccountUrl.html
index 43056dc393..a1d42b0198 100644
--- a/data/web/corefork.telegram.org/method/payments.getStarsRevenueAdsAccountUrl.html
+++ b/data/web/corefork.telegram.org/method/payments.getStarsRevenueAdsAccountUrl.html
@@ -42,7 +42,7 @@
payments.getStarsRevenueAdsAccountUrl
- Returns a URL for a Telegram Ad platform account that can be used to set up advertisements for channel/bot in peer
, paid using the Telegram Stars owned by the specified peer
, see here » for more info.
+ Returns a URL for a Telegram Ad platform account that can be used to set up advertisements for channel/bot in peer
, paid using the Telegram Stars owned by the specified peer
, see here » for more info.
-