mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2024-12-28 23:38:26 +01:00
Update content of files
This commit is contained in:
parent
83f5a2b4c8
commit
d9fffdec8a
7 changed files with 1655 additions and 1377 deletions
|
@ -50,7 +50,7 @@
|
|||
<li><a href="/bots/api">Full API Reference for Developers</a></li>
|
||||
</ul>
|
||||
<p>The <strong>Telegram Bot Platform</strong> hosts more than <strong>10 million</strong> bots and is <strong>free</strong> for both users and developers.</p>
|
||||
<h3><a class="anchor" href="#what-can-you-do-with-bots" id="what-can-you-do-with-bots" name="what-can-you-do-with-bots"><i class="anchor-icon"></i></a>What Can You Do with Bots?</h3>
|
||||
<h3><a class="anchor" name="what-can-you-do-with-bots" href="#what-can-you-do-with-bots"><i class="anchor-icon"></i></a>What Can You Do with Bots?</h3>
|
||||
<ul>
|
||||
<li><a href="#replace-entire-websites">Replace Entire Websites</a></li>
|
||||
<li><a href="#receive-payments">Receive Payments</a></li>
|
||||
|
@ -60,96 +60,103 @@
|
|||
<li><a href="#build-social-networks">Build Social Networks</a></li>
|
||||
<li><a href="#anything-else">Anything Else!</a></li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#replace-entire-websites" id="replace-entire-websites" name="replace-entire-websites"><i class="anchor-icon"></i></a>Replace Entire Websites</h4>
|
||||
<h4><a class="anchor" name="replace-entire-websites" href="#replace-entire-websites"><i class="anchor-icon"></i></a>Replace Entire Websites</h4>
|
||||
<p>Telegram bots can host full <a href="/bots/webapps">Web Apps</a> built with <em>JavaScript</em>. This allows for <strong>infinitely flexible</strong> interfaces that can power everything from online stores to arcade games. Unlike websites, bots support <a href="/api/url-authorization">seamless authorization</a> and notifications through Telegram out of the box.</p>
|
||||
<div class="blog_video_player_wrap" style="max-width: 600px; margin: 20px auto 20px;">
|
||||
<video class="blog_video_player tl_blog_vid_autoplay" onclick="videoTogglePlay(this)" autoplay loop controls muted poster="/file/464001434/100bf/eWprjdgzEbE.100386/644bbea83084f44c8f" style="max-width: 600px;" title="console.log('Vive la révolution')" alt="Bot Revolution">
|
||||
<source src="/file/464001679/11aa9/KQx_BlPVXRo.4922145.mp4/c65433c8ac11a347a8" type="video/mp4">
|
||||
</source></video>
|
||||
</video>
|
||||
</div>
|
||||
|
||||
<blockquote>
|
||||
<p>Try <a href="https://t.me/durgerkingbot">@DurgerKingBot</a> – or check out the <a href="/bots/webapps">dedicated guide to Web Apps</a> to build your own.</p>
|
||||
<p>Try <a href="https://t.me/durgerkingbot">@DurgerKingBot</a> – or check out the <a href="/bots/webapps">dedicated guide to Web Apps</a> to build your own.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" href="#receive-payments" id="receive-payments" name="receive-payments"><i class="anchor-icon"></i></a>Receive Payments</h4>
|
||||
<h4><a class="anchor" name="receive-payments" href="#receive-payments"><i class="anchor-icon"></i></a>Receive Payments</h4>
|
||||
<p>Bots can <a href="/bots/payments">receive payments</a> from more than <strong>200 countries</strong> through more than <strong>20</strong> integrated payment providers (which include support for <em>Apple Pay</em> and <em>Google Pay</em>). These payments are securely processed by the providers and Telegram takes no commission.</p>
|
||||
<div class="blog_video_player_wrap" style="max-width: 600px; margin: 20px auto 20px;">
|
||||
<video class="blog_video_player tl_blog_vid_autoplay" onclick="videoTogglePlay(this)" autoplay loop controls muted poster="/file/464001866/10889/GZJM7zyZ6UE.105798/32d6a4d1d4f0b13355" style="max-width: 600px;" title="If your pizza place can't deliver a clone army, you're buying pizza from the wrong shop." alt="Video: Ordering a pizza through a Telegram channel">
|
||||
<source src="/file/464001417/10bf1/nIRBV1iB0NY.3878528.mp4/c95b8092ce1ece10ef" type="video/mp4">
|
||||
</source></video>
|
||||
</video>
|
||||
</div>
|
||||
|
||||
<blockquote>
|
||||
<p>Try <a href="https://t.me/shopbot">@ShopBot</a> – or check out the <a href="/bots/payments">Bot Payments Manual</a> to build your own.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" href="#create-custom-tools" id="create-custom-tools" name="create-custom-tools"><i class="anchor-icon"></i></a>Create Custom Tools</h4>
|
||||
<h4><a class="anchor" name="create-custom-tools" href="#create-custom-tools"><i class="anchor-icon"></i></a>Create Custom Tools</h4>
|
||||
<p>Increase your productivity by creating bots for <strong>specific tasks</strong> – like converting files, managing chats or fetching today’s forecast. Users can chat directly with bots, or add them to groups and channels to introduce extra features.</p>
|
||||
<div class="blog_video_player_wrap" style="max-width: 600px; margin: 20px auto 20px;">
|
||||
<video class="blog_video_player tl_blog_vid_autoplay" onclick="videoTogglePlay(this)" autoplay loop controls muted poster="/file/464001084/12c1d/eNLdXm8moqA.134736/e28dd8ea6d49eee57d" style="max-width: 600px;" title="" alt="Custom tools">
|
||||
<source src="/file/464001127/10a99/GC0dSHYQTb0.3621529.mp4/75439f14147e13b6fb" type="video/mp4">
|
||||
</source></video>
|
||||
</video>
|
||||
</div>
|
||||
|
||||
<blockquote>
|
||||
<p>Try <a href="https://t.me/quizbot">@QuizBot</a> to combine several quiz-style polls into a <a href="https://telegram.org/tour/quizbot">proper quiz</a>.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" href="#integrate-with-other-services" id="integrate-with-other-services" name="integrate-with-other-services"><i class="anchor-icon"></i></a>Integrate with Other Services</h4>
|
||||
<p>Many popular platforms already have official Telegram bots, which allow users to comfortably access content in one app – or perform quick searches using <a href="/bots/inline">inline mode</a>.</p>
|
||||
<h4><a class="anchor" name="integrate-with-other-services" href="#integrate-with-other-services"><i class="anchor-icon"></i></a>Integrate with Other Services</h4>
|
||||
<p>Many popular platforms already have official Telegram bots, which allow users to comfortably access content in one app – or perform quick searches using <a href="/bots/inline">inline mode</a>.</p>
|
||||
<div style="max-width: 600px; margin: 20px auto 20px;">
|
||||
<a href="/file/464001186/11e04/7XO37b9iccE.133932/a29f8bf593af567fcc" target="_blank"><img src="/file/464001186/11e04/7XO37b9iccE.133932/a29f8bf593af567fcc" title="Gmail bot" class="dev_page_image" style="max-width: 600px;"></a>
|
||||
<a href="/file/464001186/11e04/7XO37b9iccE.133932/a29f8bf593af567fcc" target="_blank"><img src="/file/464001186/11e04/7XO37b9iccE.133932/a29f8bf593af567fcc" title="Gmail bot" class="dev_page_image" style="max-width: 600px;" /></a>
|
||||
</div>
|
||||
|
||||
<blockquote>
|
||||
<p>Try <a href="https://t.me/gmailbot">@GMailBot</a>, <a href="https://t.me/githubbot">@GitHubBot</a>, <a href="https://t.me/bing">@Bing</a>, <a href="https://t.me/youtube">@YouTube</a>, <a href="https://t.me/wiki">@wiki</a> and more.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" href="#host-games" id="host-games" name="host-games"><i class="anchor-icon"></i></a>Host Games</h4>
|
||||
<h4><a class="anchor" name="host-games" href="#host-games"><i class="anchor-icon"></i></a>Host Games</h4>
|
||||
<p>Using <a href="/bots/games">HTML5</a>, developers can create immersive single or multi-player games that allow users to <strong>team up</strong> or <strong>compete</strong> for the highest score.</p>
|
||||
<div class="blog_video_player_wrap" style="max-width: 600px; margin: 20px auto 20px;">
|
||||
<video class="blog_video_player tl_blog_vid_autoplay" onclick="videoTogglePlay(this)" autoplay loop controls muted poster="/file/464001988/109f0/_Bu1DzRXl1o.145338/e58b7165e08ecbb936" style="max-width: 600px;" title="" alt="">
|
||||
<source src="/file/464001693/1044a/rZXmc2EPIqY.3678215.mp4/94b37cec71e8e6287e" type="video/mp4">
|
||||
</source></video>
|
||||
</video>
|
||||
</div>
|
||||
|
||||
<blockquote>
|
||||
<p>Try <a href="https://t.me/gamee">@Gamee</a> and <a href="https://t.me/gamebot">@GameBot</a> – or check out the <a href="/bots/games">HTML5 Games Manual</a> to build your own. </p>
|
||||
<p>Try <a href="https://t.me/gamee">@Gamee</a> and <a href="https://t.me/gamebot">@GameBot</a> – or check out the <a href="/bots/games">HTML5 Games Manual</a> to build your own. </p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" href="#build-social-networks" id="build-social-networks" name="build-social-networks"><i class="anchor-icon"></i></a>Build Social Networks</h4>
|
||||
<h4><a class="anchor" name="build-social-networks" href="#build-social-networks"><i class="anchor-icon"></i></a>Build Social Networks</h4>
|
||||
<p>Bots can serve as an intermediary to connect users based on shared interests, location, and more. Coordinate meetups, show local services, or help people sell second-hand items.</p>
|
||||
<div class="blog_video_player_wrap" style="max-width: 600px; margin: 20px auto 20px;">
|
||||
<video class="blog_video_player tl_blog_vid_autoplay" onclick="videoTogglePlay(this)" autoplay loop controls muted poster="/file/464001041/10ebf/BPN6BLcuS8I.137509/fd81647baa51b928a2" style="max-width: 600px;" title="" alt="">
|
||||
<source src="/file/464001262/106bf/TVxoe4U0kIY.2116862.mp4/db7dfd397afbe2a61c" type="video/mp4">
|
||||
</source></video>
|
||||
</video>
|
||||
</div>
|
||||
<h4><a class="anchor" href="#anything-else" id="anything-else" name="anything-else"><i class="anchor-icon"></i></a>Anything Else</h4>
|
||||
|
||||
<h4><a class="anchor" name="anything-else" href="#anything-else"><i class="anchor-icon"></i></a>Anything Else</h4>
|
||||
<p>The possibilities for bots are endless – from simple scripts to complex web apps. Whether you’re a beginner or professional programmer, you can create personalized tools with the help of the <a href="/bots/api">Bot Platform</a>.</p>
|
||||
<hr>
|
||||
<h3><a class="anchor" href="#how-do-bots-work" id="how-do-bots-work" name="how-do-bots-work"><i class="anchor-icon"></i></a>How Do Bots Work?</h3>
|
||||
<h3><a class="anchor" name="how-do-bots-work" href="#how-do-bots-work"><i class="anchor-icon"></i></a>How Do Bots Work?</h3>
|
||||
<blockquote>
|
||||
<p>For a detailed explanation of Bot Features, see <a href="/bots/features">this guide</a> </p>
|
||||
</blockquote>
|
||||
<p>Telegram bots are special accounts that do not need a phone number to set up. Bots are connected to their owner’s server, which processes inputs and requests from users.</p>
|
||||
<p>Telegram’s intermediary server handles all encryption and communication with the Telegram API. Developers communicate with this server via an easy HTTPS-interface with a simplified version of the <a href="/api">Telegram API</a> – known as the <a href="/bots/api">Bot API</a>.</p>
|
||||
<h4><a class="anchor" href="#how-are-bots-different-from-users" id="how-are-bots-different-from-users" name="how-are-bots-different-from-users"><i class="anchor-icon"></i></a>How Are Bots Different from Users?</h4>
|
||||
<h4><a class="anchor" name="how-are-bots-different-from-users" href="#how-are-bots-different-from-users"><i class="anchor-icon"></i></a>How Are Bots Different from Users?</h4>
|
||||
<p>Bots are able to process inputs and requests in ways that user accounts can’t, but there are several differences between a bot and a normal user.</p>
|
||||
<ul>
|
||||
<li>Bots don’t have ‘last seen’ or online statuses – instead they show a ‘bot’ label in the chat.</li>
|
||||
<li>Bots have limited cloud storage – older messages may be removed by the server shortly after they have been processed.</li>
|
||||
<li>Bots can't start conversations with users. A user must either add them to a group or send them a message first. People can search for your bot’s username or start a chat via its unique t.me/bot_username link.</li>
|
||||
<li>Bots can't start conversations with users. A user must either add them to a group or send them a message first. People can search for your bot’s username or start a chat via its unique t.me/bot_username link.</li>
|
||||
<li>By default, bots added to groups <strong>only see relevant messages</strong> in the chat (see <a href="/bots/features#privacy-mode">Privacy Mode</a>).</li>
|
||||
<li>Bots never eat, sleep or complain (unless expressly programmed otherwise).</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#bot-links" id="bot-links" name="bot-links"><i class="anchor-icon"></i></a>Bot Links</h4>
|
||||
<h4><a class="anchor" name="bot-links" href="#bot-links"><i class="anchor-icon"></i></a>Bot Links</h4>
|
||||
<p>Bot usernames normally require a ‘bot’ suffix, but some bots don’t have them – such as <a href="https://t.me/stickers">@stickers</a>, <a href="https://t.me/gif">@gif</a>, <a href="https://t.me/wiki">@wiki</a> or <a href="https://t.me/bing">@bing</a>. </p>
|
||||
<p>Anyone can <a href="https://telegram.org/blog/shareable-folders-custom-wallpapers#bot-links-and-telegram-premium-on-fragment">assign collectible usernames</a> to bots, including those without the 'bot' suffix.</p>
|
||||
<h3><a class="anchor" href="#how-do-i-create-a-bot" id="how-do-i-create-a-bot" name="how-do-i-create-a-bot"><i class="anchor-icon"></i></a>How Do I Create a Bot?</h3>
|
||||
<p>Anyone can <a href="https://telegram.org/blog/shareable-folders-custom-wallpapers#bot-links-and-telegram-premium-on-fragment">assign collectible usernames</a> to bots, including those without the 'bot' suffix.</p>
|
||||
<h3><a class="anchor" name="how-do-i-create-a-bot" href="#how-do-i-create-a-bot"><i class="anchor-icon"></i></a>How Do I Create a Bot?</h3>
|
||||
<p>Creating Telegram bots is super-easy, but you will need at least some skills in <strong>computer programming</strong>. </p>
|
||||
<p>Creating a bot is streamlined by Telegram’s Bot API, which gives the tools and framework required to integrate your code. To get started, message <a href="https://t.me/botfather">@BotFather</a> on Telegram to register your bot and receive its authentication token.</p>
|
||||
<blockquote>
|
||||
<p>Your <strong>bot token</strong> is its unique identifier – store it in a <strong>secure place</strong>, and only share it with people who need direct access to the bot. Everyone who has your token will have <strong>full control</strong> over your bot.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" href="#what-next" id="what-next" name="what-next"><i class="anchor-icon"></i></a>What Next?</h4>
|
||||
<h4><a class="anchor" name="what-next" href="#what-next"><i class="anchor-icon"></i></a>What Next?</h4>
|
||||
<p>We recommend that you check out our guide to <a href="/bots/features">Bot Features</a> to see what you can teach your bot to do:</p>
|
||||
<ul>
|
||||
<li><a href="/bots/features">Detailed Guide to Bot Features</a></li>
|
||||
<li><a href="/bots/api">Full API Reference for Developers</a></li>
|
||||
<li><a href="/bots/tutorial">Basic Tutorial: From @BotFather to 'Hello World'</a></li>
|
||||
<li><a href="/bots/tutorial">Basic Tutorial: From @BotFather to 'Hello World'</a></li>
|
||||
<li><a href="/bots/samples">Code Examples</a></li>
|
||||
</ul></div>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -47,16 +47,27 @@ To learn how to create…">
|
|||
<div id="dev_page_content"><!-- scroll_nav -->
|
||||
|
||||
<blockquote>
|
||||
<p>The Bot API is an HTTP-based interface created for developers keen on building bots for Telegram.
|
||||
To learn how to create and set up a bot, please consult our <a href="https://core.telegram.org/bots"><strong>Introduction to Bots »</strong></a></p>
|
||||
<p>The Bot API is an HTTP-based interface created for developers keen on building bots for Telegram.<br>To learn how to create and set up a bot, please consult our <a href="https://core.telegram.org/bots"><strong>Introduction to Bots »</strong></a></p>
|
||||
</blockquote>
|
||||
<p>You will find all changes to our <a href="/bots/api"><strong>Bot API</strong></a> on this page.</p>
|
||||
<h3><a class="anchor" href="#recent-changes" id="recent-changes" name="recent-changes"><i class="anchor-icon"></i></a>Recent changes</h3>
|
||||
<h3><a class="anchor" name="recent-changes" href="#recent-changes"><i class="anchor-icon"></i></a>Recent changes</h3>
|
||||
<blockquote>
|
||||
<p>Subscribe to <a href="https://t.me/botnews">@BotNews</a> to be the first to know about the latest updates and join the discussion in <a href="https://t.me/bottalk">@BotTalk</a></p>
|
||||
</blockquote>
|
||||
<h3><a class="anchor" href="#2023" id="2023" name="2023"><i class="anchor-icon"></i></a>2023</h3>
|
||||
<h4><a class="anchor" href="#march-9-2023" id="march-9-2023" name="march-9-2023"><i class="anchor-icon"></i></a>March 9, 2023</h4>
|
||||
<h3><a class="anchor" name="2023" href="#2023"><i class="anchor-icon"></i></a>2023</h3>
|
||||
<h4><a class="anchor" name="april-21-2023" href="#april-21-2023"><i class="anchor-icon"></i></a>April 21, 2023</h4>
|
||||
<p><strong>Bot API 6.7</strong></p>
|
||||
<ul>
|
||||
<li>Added support for launching <a href="/bots/webapps">Web Apps</a> from inline query results by replacing the parameters <em>switch_pm_text</em> and <em>switch_pm_parameter</em> of the method <a href="/bots/api#answerinlinequery">answerInlineQuery</a> with the parameter <em>button</em> of type <a href="/bots/api#inlinequeryresultsbutton">InlineQueryResultsButton</a>.</li>
|
||||
<li>Added the field <em>web_app_name</em> to the class <a href="/bots/api#writeaccessallowed">WriteAccessAllowed</a>.</li>
|
||||
<li>Added the field <em>switch_inline_query_chosen_chat</em> of the type <a href="/bots/api#switchinlinequerychosenchat">SwitchInlineQueryChosenChat</a> to the class <a href="/bots/api#inlinekeyboardbutton">InlineKeyboardButton</a>, which allows bots to switch to inline mode in a chosen chat of the given type.</li>
|
||||
<li>Added the field <em>via_chat_folder_invite_link</em> to the class <a href="/bots/api#chatmemberupdated">ChatMemberUpdated</a>.</li>
|
||||
<li>Added the ability to set different bot names for different user languages using the method <a href="/bots/api#setmyname">setMyName</a>.</li>
|
||||
<li>Added the ability to get the current bot name in the given language as the class <a href="/bots/api#botname">BotName</a> using the method <a href="/bots/api#getmyname">getMyName</a>.</li>
|
||||
<li>Added the ability to change bot settings from the bot's profile in official Telegram apps, including the ability to set animated profile photos.</li>
|
||||
<li>Added the ability to specify custom emoji entities using <a href="/bots/api#html-style">HTML</a> and <a href="/bots/api#markdownv2-style">MarkdownV2</a> formatting options for bots that purchased additional usernames on <a href="https://fragment.com">Fragment</a>.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" name="march-9-2023" href="#march-9-2023"><i class="anchor-icon"></i></a>March 9, 2023</h4>
|
||||
<p><strong>Bot API 6.6</strong></p>
|
||||
<ul>
|
||||
<li>Added the ability to set different bot descriptions for different user languages using the method <a href="/bots/api#setmydescription">setMyDescription</a>.</li>
|
||||
|
@ -85,7 +96,7 @@ To learn how to create and set up a bot, please consult our <a href="https://cor
|
|||
<li>Renamed the field <em>thumb_url</em> in the classes <a href="/bots/api#inlinequeryresultphoto">InlineQueryResultPhoto</a> and <a href="/bots/api#inlinequeryresultvideo">InlineQueryResultVideo</a> to <em>thumbnail_url</em>.</li>
|
||||
<li>Renamed the fields <em>thumb_url</em> and <em>thumb_mime_type</em> in the classes <a href="/bots/api#inlinequeryresultgif">InlineQueryResultGif</a>, and <a href="/bots/api#inlinequeryresultmpeg4gif">InlineQueryResultMpeg4Gif</a> to <em>thumbnail_url</em> and <em>thumbnail_mime_type</em> respectively.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#february-3-2023" id="february-3-2023" name="february-3-2023"><i class="anchor-icon"></i></a>February 3, 2023</h4>
|
||||
<h4><a class="anchor" name="february-3-2023" href="#february-3-2023"><i class="anchor-icon"></i></a>February 3, 2023</h4>
|
||||
<p><strong>Bot API 6.5</strong></p>
|
||||
<ul>
|
||||
<li>Added <a href="https://telegram.org/blog/profile-pics-emoji-translations#chat-selection-for-bots">requests for users and chats</a> and support for <a href="https://telegram.org/blog/profile-pics-emoji-translations#granular-media-permissions">granular media permissions</a>.</li>
|
||||
|
@ -96,8 +107,8 @@ To learn how to create and set up a bot, please consult our <a href="https://cor
|
|||
<li>Added the parameter <em>use_independent_chat_permissions</em> to the methods <a href="/bots/api#restrictchatmember">restrictChatMember</a> and <a href="/bots/api#setchatpermissions">setChatPermissions</a>.</li>
|
||||
<li>Added the field <em>user_chat_id</em> to the class <a href="/bots/api#chatjoinrequest">ChatJoinRequest</a>.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" href="#2022" id="2022" name="2022"><i class="anchor-icon"></i></a>2022</h3>
|
||||
<h4><a class="anchor" href="#december-30-2022" id="december-30-2022" name="december-30-2022"><i class="anchor-icon"></i></a>December 30, 2022</h4>
|
||||
<h3><a class="anchor" name="2022" href="#2022"><i class="anchor-icon"></i></a>2022</h3>
|
||||
<h4><a class="anchor" name="december-30-2022" href="#december-30-2022"><i class="anchor-icon"></i></a>December 30, 2022</h4>
|
||||
<p><strong>Bot API 6.4</strong></p>
|
||||
<ul>
|
||||
<li>Added the field <em>is_persistent</em> to the class <a href="/bots/api#replykeyboardmarkup">ReplyKeyboardMarkup</a>, allowing to control when the keyboard is shown.</li>
|
||||
|
@ -115,13 +126,13 @@ To learn how to create and set up a bot, please consult our <a href="https://cor
|
|||
<li>Added the methods <em>showScanQrPopup</em>, <em>closeScanQrPopup</em>, and <em>readTextFromClipboard</em> to the class <a href="/bots/webapps#initializing-web-apps">WebApp</a>.</li>
|
||||
<li>Added the parameter <em>options</em> to the method <em>openLink</em> of the class <a href="/bots/webapps#initializing-web-apps">WebApp</a>.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#november-5-2022" id="november-5-2022" name="november-5-2022"><i class="anchor-icon"></i></a>November 5, 2022</h4>
|
||||
<h4><a class="anchor" name="november-5-2022" href="#november-5-2022"><i class="anchor-icon"></i></a>November 5, 2022</h4>
|
||||
<p><strong>Bot API 6.3</strong></p>
|
||||
<ul>
|
||||
<li>Added support for <a href="https://telegram.org/blog/topics-in-groups-collectible-usernames#topics-in-groups">Topics in Groups</a>.</li>
|
||||
<li>Added the field <em>is_forum</em> to the class <a href="/bots/api#chat">Chat</a>.</li>
|
||||
<li>Added the fields <em>is_topic_message</em> and <em>message_thread_id</em> to the class <a href="/bots/api#message">Message</a> to allow detection of messages belonging to a forum topic and their message thread identifier.</li>
|
||||
<li>Added the classes <a href="/bots/api#forumtopiccreated">ForumTopicCreated</a>, <a href="/bots/api#forumtopicclosed">ForumTopicClosed</a>, and <a href="/bots/api#forumtopicreopened">ForumTopicReopened</a> and the fields <em>forum_topic_created</em>, <em>forum_topic_closed</em>, and <em>forum_topic_reopened</em> to the class <a href="/bots/api#message">Message</a>. Note that service messages about forum topic creation can't be deleted with the <a href="/bots/api#deletemessage">deleteMessage</a> method.</li>
|
||||
<li>Added the classes <a href="/bots/api#forumtopiccreated">ForumTopicCreated</a>, <a href="/bots/api#forumtopicclosed">ForumTopicClosed</a>, and <a href="/bots/api#forumtopicreopened">ForumTopicReopened</a> and the fields <em>forum_topic_created</em>, <em>forum_topic_closed</em>, and <em>forum_topic_reopened</em> to the class <a href="/bots/api#message">Message</a>. Note that service messages about forum topic creation can't be deleted with the <a href="/bots/api#deletemessage">deleteMessage</a> method.</li>
|
||||
<li>Added the field <em>can_manage_topics</em> to the classes <a href="/bots/api#chatadministratorrights">ChatAdministratorRights</a>, <a href="/bots/api#chatpermissions">ChatPermissions</a>, <a href="/bots/api#chatmemberadministrator">ChatMemberAdministrator</a>, and <a href="/bots/api#chatmemberrestricted">ChatMemberRestricted</a>.</li>
|
||||
<li>Added the parameter <em>can_manage_topics</em> to the method <a href="/bots/api#promotechatmember">promoteChatMember</a>.</li>
|
||||
<li>Added the methods <a href="/bots/api#createforumtopic">createForumTopic</a>, <a href="/bots/api#editforumtopic">editForumTopic</a>, <a href="/bots/api#closeforumtopic">closeForumTopic</a>, <a href="/bots/api#reopenforumtopic">reopenForumTopic</a>, <a href="/bots/api#deleteforumtopic">deleteForumTopic</a>, <a href="/bots/api#unpinallforumtopicmessages">unpinAllForumTopicMessages</a>, and <a href="/bots/api#getforumtopiciconstickers">getForumTopicIconStickers</a> for forum topic management.</li>
|
||||
|
@ -129,12 +140,12 @@ To learn how to create and set up a bot, please consult our <a href="https://cor
|
|||
<li>Added support for <a href="https://telegram.org/blog/topics-in-groups-collectible-usernames#collectible-usernames">Multiple Usernames</a> via the field <em>active_usernames</em> in the class <a href="/bots/api#chat">Chat</a>.</li>
|
||||
<li>Added the field <em>emoji_status_custom_emoji_id</em> to the class <a href="/bots/api#chat">Chat</a>.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#august-12-2022" id="august-12-2022" name="august-12-2022"><i class="anchor-icon"></i></a>August 12, 2022</h4>
|
||||
<h4><a class="anchor" name="august-12-2022" href="#august-12-2022"><i class="anchor-icon"></i></a>August 12, 2022</h4>
|
||||
<p><strong>Bot API 6.2</strong></p>
|
||||
<p><strong>Custom Emoji Support</strong></p>
|
||||
<ul>
|
||||
<li>Added the <a href="/bots/api#messageentity">MessageEntity</a> type "custom_emoji".</li>
|
||||
<li>Added the field <em>custom_emoji_id</em> to the class <a href="/bots/api#messageentity">MessageEntity</a> for "custom_emoji" entities.</li>
|
||||
<li>Added the <a href="/bots/api#messageentity">MessageEntity</a> type “custom_emoji”.</li>
|
||||
<li>Added the field <em>custom_emoji_id</em> to the class <a href="/bots/api#messageentity">MessageEntity</a> for “custom_emoji” entities.</li>
|
||||
<li>Added the method <a href="/bots/api#getcustomemojistickers">getCustomEmojiStickers</a>.</li>
|
||||
<li>Added the fields <em>type</em> and <em>custom_emoji_id</em> to the class <a href="/bots/api#sticker">Sticker</a>.</li>
|
||||
<li>Added the field <em>sticker_type</em> to the class <a href="/bots/api#stickerset">StickerSet</a>, describing the type of stickers in the set.</li>
|
||||
|
@ -152,11 +163,11 @@ To learn how to create and set up a bot, please consult our <a href="https://cor
|
|||
<ul>
|
||||
<li>Added the field <em>has_restricted_voice_and_video_messages</em> to the class <a href="/bots/api#chat">Chat</a> to support the <a href="https://telegram.org/blog/custom-emoji#privacy-settings-for-voice-messages">new setting</a>.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#june-20-2022" id="june-20-2022" name="june-20-2022"><i class="anchor-icon"></i></a>June 20, 2022</h4>
|
||||
<h4><a class="anchor" name="june-20-2022" href="#june-20-2022"><i class="anchor-icon"></i></a>June 20, 2022</h4>
|
||||
<p><strong>Bot API 6.1</strong></p>
|
||||
<p><strong>Media in Descriptions</strong></p>
|
||||
<ul>
|
||||
<li>Added support for photos and videos in the 'What can this bot do?' section (shown on the bot's start screen). Use <a href="https://t.me/BotFather">BotFather</a> to set up media.</li>
|
||||
<li>Added support for photos and videos in the 'What can this bot do?' section (shown on the bot's start screen). Use <a href="https://t.me/BotFather">BotFather</a> to set up media.</li>
|
||||
</ul>
|
||||
<p><strong>Web App Improvements</strong></p>
|
||||
<ul>
|
||||
|
@ -169,7 +180,7 @@ To learn how to create and set up a bot, please consult our <a href="https://cor
|
|||
<p><strong>Join Requests & Payments</strong></p>
|
||||
<ul>
|
||||
<li>Added the fields <em>join_to_send_messages</em> and <em>join_by_request</em> to the class <a href="/bots/api#chat">Chat</a>.</li>
|
||||
<li>Added the ability to process join requests which were created <a href="https://telegram.org/blog/700-million-and-premium#join-requests-for-public-groups">without an invite link</a>. Bots will receive a "chat_join_request" update as usual.</li>
|
||||
<li>Added the ability to process join requests which were created <a href="https://telegram.org/blog/700-million-and-premium#join-requests-for-public-groups">without an invite link</a>. Bots will receive a “chat_join_request” update as usual.</li>
|
||||
<li>Added the method <a href="/bots/api#createinvoicelink">createInvoiceLink</a> to generate an HTTP link for an invoice.</li>
|
||||
</ul>
|
||||
<p><strong>Telegram Premium Support</strong> (<a href="https://telegram.org/blog/700-million-and-premium#telegram-premium">more info</a>)</p>
|
||||
|
@ -189,15 +200,15 @@ To learn how to create and set up a bot, please consult our <a href="https://cor
|
|||
<li>Added the parameter <em>secret_token</em> to the method <a href="/bots/api#setwebhook">setWebhook</a>.</li>
|
||||
<li>As previously announced, only HTTPS links are now allowed in <em>login_url</em> inline keyboard buttons.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#april-16-2022" id="april-16-2022" name="april-16-2022"><i class="anchor-icon"></i></a>April 16, 2022</h4>
|
||||
<h4><a class="anchor" name="april-16-2022" href="#april-16-2022"><i class="anchor-icon"></i></a>April 16, 2022</h4>
|
||||
<p><strong>Bot API 6.0</strong></p>
|
||||
<ul>
|
||||
<li>Added support for <strong>Web Apps</strong>, see the <a href="/bots/webapps">detailed manual here</a>. (<a href="https://telegram.org/blog/notifications-bots">blog announcement</a>)</li>
|
||||
<li>Added the class <a href="/bots/api#webappinfo">WebAppInfo</a> and the fields <em>web_app</em> to the classes <a href="/bots/api#keyboardbutton">KeyboardButton</a> and <a href="/bots/api#inlinekeyboardbutton">InlineKeyboardButton</a>.</li>
|
||||
<li>Added the class <a href="/bots/api#sentwebappmessage">SentWebAppMessage</a> and the method <a href="/bots/api#answerwebappquery">answerWebAppQuery</a> for sending an answer to a Web App query, which originated from an inline button of the 'web_app' type.</li>
|
||||
<li>Added the class <a href="/bots/api#sentwebappmessage">SentWebAppMessage</a> and the method <a href="/bots/api#answerwebappquery">answerWebAppQuery</a> for sending an answer to a Web App query, which originated from an inline button of the 'web_app' type.</li>
|
||||
<li>Added the class <a href="/bots/api#webappdata">WebAppData</a> and the field <em>web_app_data</em> to the class <a href="/bots/api#message">Message</a>.</li>
|
||||
<li>Added the class <a href="/bots/api#menubutton">MenuButton</a> and the methods <a href="/bots/api#setchatmenubutton">setChatMenuButton</a> and <a href="/bots/api#getchatmenubutton">getChatMenuButton</a> for managing the behavior of the bot's menu button in private chats.</li>
|
||||
<li>Added the class <a href="/bots/api#chatadministratorrights">ChatAdministratorRights</a> and the methods <a href="/bots/api#setmydefaultadministratorrights">setMyDefaultAdministratorRights</a> and <a href="/bots/api#getmydefaultadministratorrights">getMyDefaultAdministratorRights</a> for managing the bot's default administrator rights.</li>
|
||||
<li>Added the class <a href="/bots/api#menubutton">MenuButton</a> and the methods <a href="/bots/api#setchatmenubutton">setChatMenuButton</a> and <a href="/bots/api#getchatmenubutton">getChatMenuButton</a> for managing the behavior of the bot's menu button in private chats.</li>
|
||||
<li>Added the class <a href="/bots/api#chatadministratorrights">ChatAdministratorRights</a> and the methods <a href="/bots/api#setmydefaultadministratorrights">setMyDefaultAdministratorRights</a> and <a href="/bots/api#getmydefaultadministratorrights">getMyDefaultAdministratorRights</a> for managing the bot's default administrator rights.</li>
|
||||
<li>Added support for t.me links that can be used to add the bot to groups and channels as an administrator.</li>
|
||||
<li>Added the field <em>last_synchronization_error_date</em> to the class <a href="/bots/api#webhookinfo">WebhookInfo</a>.</li>
|
||||
<li>Renamed the field <em>can_manage_voice_chats</em> to <em>can_manage_video_chats</em> in the class <a href="/bots/api#chatmemberadministrator">ChatMemberAdministrator</a>. The old field will remain temporarily available.</li>
|
||||
|
@ -206,31 +217,30 @@ To learn how to create and set up a bot, please consult our <a href="https://cor
|
|||
</ul>
|
||||
<hr>
|
||||
<blockquote>
|
||||
<p><strong><img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /> WARNING! <img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /></strong>
|
||||
After the next update, only HTTPS links will be allowed in <em>login_url</em> inline keyboard buttons.</p>
|
||||
<p><strong><img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /> WARNING! <img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /></strong><br>After the next update, only HTTPS links will be allowed in <em>login_url</em> inline keyboard buttons.</p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<h4><a class="anchor" href="#january-31-2022" id="january-31-2022" name="january-31-2022"><i class="anchor-icon"></i></a>January 31, 2022</h4>
|
||||
<h4><a class="anchor" name="january-31-2022" href="#january-31-2022"><i class="anchor-icon"></i></a>January 31, 2022</h4>
|
||||
<p><strong>Bot API 5.7</strong></p>
|
||||
<ul>
|
||||
<li>Added support for <a href="https://telegram.org/blog/video-stickers-better-reactions">Video Stickers</a>.</li>
|
||||
<li>Added the field <em>is_video</em> to the classes <a href="/bots/api#sticker">Sticker</a> and <a href="/bots/api#stickerset">StickerSet</a>.</li>
|
||||
<li>Added the parameter <em>webm_sticker</em> to the methods <a href="/bots/api#createnewstickerset">createNewStickerSet</a> and <a href="/bots/api#addstickertoset">addStickerToSet</a>.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" href="#2021" id="2021" name="2021"><i class="anchor-icon"></i></a>2021</h3>
|
||||
<h4><a class="anchor" href="#december-30-2021" id="december-30-2021" name="december-30-2021"><i class="anchor-icon"></i></a>December 30, 2021</h4>
|
||||
<h3><a class="anchor" name="2021" href="#2021"><i class="anchor-icon"></i></a>2021</h3>
|
||||
<h4><a class="anchor" name="december-30-2021" href="#december-30-2021"><i class="anchor-icon"></i></a>December 30, 2021</h4>
|
||||
<p><strong>Bot API 5.6</strong></p>
|
||||
<ul>
|
||||
<li>Improved support for <a href="https://telegram.org/blog/protected-content-delete-by-date-and-more#protected-content-in-groups-and-channels">Protected Content</a>.</li>
|
||||
<li>Added the parameter <em>protect_content</em> to the methods <a href="/bots/api#sendmessage">sendMessage</a>, <a href="/bots/api#sendphoto">sendPhoto</a>, <a href="/bots/api#sendvideo">sendVideo</a>, <a href="/bots/api#sendanimation">sendAnimation</a>, <a href="/bots/api#sendaudio">sendAudio</a>, <a href="/bots/api#senddocument">sendDocument</a>, <a href="/bots/api#sendsticker">sendSticker</a>, <a href="/bots/api#sendvideonote">sendVideoNote</a>, <a href="/bots/api#sendvoice">sendVoice</a>, <a href="/bots/api#sendlocation">sendLocation</a>, <a href="/bots/api#sendvenue">sendVenue</a>, <a href="/bots/api#sendcontact">sendContact</a>, <a href="/bots/api#sendpoll">sendPoll</a>, <a href="/bots/api#senddice">sendDice</a>, <a href="/bots/api#sendinvoice">sendInvoice</a>, <a href="/bots/api#sendgame">sendGame</a>, <a href="/bots/api#sendmediagroup">sendMediaGroup</a>, <a href="/bots/api#copymessage">copyMessage</a>, <a href="/bots/api#forwardmessage">forwardMessage</a> to allow sending messages with protected content to any chat.</li>
|
||||
<li>Added support for <a href="https://telegram.org/blog/reactions-spoilers-translations#spoilers">spoiler entities</a>, which will work in Telegram versions released after December 30, 2021. Older clients will display <em>unsupported message</em>.</li>
|
||||
<li>Added new <a href="/bots/api#messageentity">MessageEntity</a> type "spoiler".</li>
|
||||
<li>Added new <a href="/bots/api#messageentity">MessageEntity</a> type “spoiler”.</li>
|
||||
<li>Added the ability to specify spoiler entities using <a href="/bots/api#html-style">HTML</a> and <a href="/bots/api#markdownv2-style">MarkdownV2</a> formatting options.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#december-7-2021" id="december-7-2021" name="december-7-2021"><i class="anchor-icon"></i></a>December 7, 2021</h4>
|
||||
<h4><a class="anchor" name="december-7-2021" href="#december-7-2021"><i class="anchor-icon"></i></a>December 7, 2021</h4>
|
||||
<p><strong>Bot API 5.5</strong></p>
|
||||
<ul>
|
||||
<li>Bots are now allowed to contact users who sent a join request to a chat where the bot is an administrator with the <em>can_invite_users</em> administrator right – even if the user never interacted with the bot before.</li>
|
||||
<li>Bots are now allowed to contact users who sent a join request to a chat where the bot is an administrator with the <em>can_invite_users</em> administrator right – even if the user never interacted with the bot before.</li>
|
||||
<li>Added support for mentioning users by their ID in inline keyboards. This will only work in Telegram versions released after December 7, 2021. Older clients will display <em>unsupported message</em>.</li>
|
||||
<li>Added the methods <a href="/bots/api#banchatsenderchat">banChatSenderChat</a> and <a href="/bots/api#unbanchatsenderchat">unbanChatSenderChat</a> for banning and unbanning channel chats in supergroups and channels.</li>
|
||||
<li>Added the field <em>has_private_forwards</em> to the class <a href="/bots/api#chat">Chat</a> for private chats, which can be used to check the possibility of mentioning the user by their ID.</li>
|
||||
|
@ -240,10 +250,10 @@ After the next update, only HTTPS links will be allowed in <em>login_url</em> in
|
|||
<p><strong>Note:</strong> After this update it will become impossible to forward messages from some chats. Use the fields <em>has_protected_content</em> in the classes <a href="/bots/api#message">Message</a> and <a href="/bots/api#chat">Chat</a> to check this.</p>
|
||||
<p><strong>Note:</strong> After this update users are able to send messages on behalf of channels they own. Bots are expected to use the field <em>sender_chat</em> in the class <a href="/bots/api#message">Message</a> to correctly support such messages.</p>
|
||||
<p><strong>Note:</strong> As previously announced, user identifiers can now have up to 52 significant bits and require a 64-bit integer or double-precision float type to be stored safely.</p>
|
||||
<h4><a class="anchor" href="#november-5-2021" id="november-5-2021" name="november-5-2021"><i class="anchor-icon"></i></a>November 5, 2021</h4>
|
||||
<h4><a class="anchor" name="november-5-2021" href="#november-5-2021"><i class="anchor-icon"></i></a>November 5, 2021</h4>
|
||||
<p><strong>Bot API 5.4</strong></p>
|
||||
<ul>
|
||||
<li>Added the parameter <code>creates_join_request</code> to the methods <a href="/bots/api#createchatinvitelink">createChatInviteLink</a> and <a href="/bots/api#editchatinvitelink">editChatInviteLink</a> for managing chat invite links that create join requests (read more about this on our <a href="https://telegram.org/blog/shared-media-scrolling-calendar-join-requests-and-more#join-requests-for-groups-and-channels">blog</a>).</li>
|
||||
<li>Added the the parameter <code>creates_join_request</code> to the methods <a href="/bots/api#createchatinvitelink">createChatInviteLink</a> and <a href="/bots/api#editchatinvitelink">editChatInviteLink</a> for managing chat invite links that create join requests (read more about this on our <a href="https://telegram.org/blog/shared-media-scrolling-calendar-join-requests-and-more#join-requests-for-groups-and-channels">blog</a>).</li>
|
||||
<li>Added the fields <code>creates_join_request</code> and <code>pending_join_request_count</code> to the class <a href="/bots/api#chatinvitelink">ChatInviteLink</a>.</li>
|
||||
<li>Added the field <code>name</code> to the class <a href="/bots/api#chatinvitelink">ChatInviteLink</a> and the parameters <code>name</code> to the methods <a href="/bots/api#createchatinvitelink">createChatInviteLink</a> and <a href="/bots/api#editchatinvitelink">editChatInviteLink</a> for managing <a href="https://telegram.org/blog/shared-media-scrolling-calendar-join-requests-and-more#unique-names-for-invite-links">invite link names</a>.</li>
|
||||
<li>Added updates about new requests to join the chat, represented by the class <a href="/bots/api#chatjoinrequest">ChatJoinRequest</a> and the field <em>chat_join_request</em> in the <a href="/bots/api#update">Update</a> class. The bot must be an administrator in the chat with the <em>can_invite_users</em> administrator right to receive these updates.</li>
|
||||
|
@ -252,11 +262,10 @@ After the next update, only HTTPS links will be allowed in <em>login_url</em> in
|
|||
</ul>
|
||||
<hr>
|
||||
<blockquote>
|
||||
<p><strong><img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /> WARNING! <img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /></strong>
|
||||
User identifiers will become bigger than <code>2^31 - 1</code> before the end of this year and it will be no longer possible to store them in a signed 32-bit integer type. User identifiers will have up to 52 significant bits, so a 64-bit integer or double-precision float type would still be safe for storing them. Please make sure that your code can correctly handle such user identifiers.</p>
|
||||
<p><strong><img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /> WARNING! <img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /></strong><br>User identifiers will become bigger than <code>2^31 - 1</code> before the end of this year and it will be no longer possible to store them in a signed 32-bit integer type. User identifiers will have up to 52 significant bits, so a 64-bit integer or double-precision float type would still be safe for storing them. Please make sure that your code can correctly handle such user identifiers.</p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<h4><a class="anchor" href="#june-25-2021" id="june-25-2021" name="june-25-2021"><i class="anchor-icon"></i></a>June 25, 2021</h4>
|
||||
<h4><a class="anchor" name="june-25-2021" href="#june-25-2021"><i class="anchor-icon"></i></a>June 25, 2021</h4>
|
||||
<p><strong>Bot API 5.3</strong></p>
|
||||
<p><strong>Personalized Commands</strong></p>
|
||||
<ul>
|
||||
|
@ -264,8 +273,8 @@ User identifiers will become bigger than <code>2^31 - 1</code> before the end of
|
|||
<li>Added the class <a href="/bots/api#botcommandscope">BotCommandScope</a>, describing the scope to which bot commands apply.</li>
|
||||
<li>Added the parameters <code>scope</code> and <code>language_code</code> to the method <a href="/bots/api#setmycommands">setMyCommands</a> to allow bots specify different commands for different chats and users.</li>
|
||||
<li>Added the parameters <code>scope</code> and <code>language_code</code> to the method <a href="/bots/api#getmycommands">getMyCommands</a>.</li>
|
||||
<li>Added the method <a href="/bots/api#deletemycommands">deleteMyCommands</a> to allow deletion of the bot's commands for the given scope and user language.</li>
|
||||
<li>Improved visibility of bot commands in Telegram apps with the new 'Menu' button in chats with bots, read more on the <a href="https://telegram.org/blog/animated-backgrounds#bot-menu">blog</a>.</li>
|
||||
<li>Added the method <a href="/bots/api#deletemycommands">deleteMyCommands</a> to allow deletion of the bot's commands for the given scope and user language.</li>
|
||||
<li>Improved visibility of bot commands in Telegram apps with the new 'Menu' button in chats with bots, read more on the <a href="https://telegram.org/blog/animated-backgrounds#bot-menu">blog</a>.</li>
|
||||
</ul>
|
||||
<p><strong>Custom Placeholders</strong></p>
|
||||
<ul>
|
||||
|
@ -280,39 +289,35 @@ User identifiers will become bigger than <code>2^31 - 1</code> before the end of
|
|||
</ul>
|
||||
<hr>
|
||||
<blockquote>
|
||||
<p><strong><img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /> WARNING! <img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /></strong>
|
||||
After one of the upcoming Bot API updates, user identifiers will become bigger than <code>2^31 - 1</code> and it will be no longer possible to store them in a signed 32-bit integer type. User identifiers will have up to 52 significant bits, so a 64-bit integer or double-precision float type would still be safe for storing them. Please make sure that your code can correctly handle such user identifiers.</p>
|
||||
<p><strong><img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /> WARNING! <img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /></strong><br>After one of the upcoming Bot API updates, user identifiers will become bigger than <code>2^31 - 1</code> and it will be no longer possible to store them in a signed 32-bit integer type. User identifiers will have up to 52 significant bits, so a 64-bit integer or double-precision float type would still be safe for storing them. Please make sure that your code can correctly handle such user identifiers.</p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<h4><a class="anchor" href="#april-26-2021" id="april-26-2021" name="april-26-2021"><i class="anchor-icon"></i></a>April 26, 2021</h4>
|
||||
<h4><a class="anchor" name="april-26-2021" href="#april-26-2021"><i class="anchor-icon"></i></a>April 26, 2021</h4>
|
||||
<p><strong>Bot API 5.2</strong></p>
|
||||
<ul>
|
||||
<li>Support for <a href="https://telegram.org/blog/payments-2-0-scheduled-voice-chats">Payments 2.0</a>, see <a href="https://core.telegram.org/bots/payments">this manual</a> for more details about the <strong>Bot Payments API</strong>.</li>
|
||||
<li>Added the type <a href="/bots/api#inputinvoicemessagecontent">InputInvoiceMessageContent</a> to support sending invoices as inline query results.</li>
|
||||
<li>Allowed sending invoices to group, supergroup and channel chats.</li>
|
||||
<li>Added the fields <em>max_tip_amount</em> and <em>suggested_tip_amounts</em> to the method <a href="/bots/api#sendinvoice">sendInvoice</a> to allow adding optional tips to the payment.</li>
|
||||
<li>The parameter <em>start_parameter</em> of the method <a href="/bots/api#sendinvoice">sendInvoice</a> became optional. If the parameter isn't specified, the invoice can be paid directly from forwarded messages.</li>
|
||||
<li>The parameter <em>start_parameter</em> of the method <a href="/bots/api#sendinvoice">sendInvoice</a> became optional. If the parameter isn't specified, the invoice can be paid directly from forwarded messages.</li>
|
||||
<li>Added the field <em>chat_type</em> to the class <a href="/bots/api#inlinequery">InlineQuery</a>, containing the type of the chat, from which the inline request was sent.</li>
|
||||
<li>Added the type <a href="/bots/api#voicechatscheduled">VoiceChatScheduled</a> and the field <em>voice_chat_scheduled</em> to the class <a href="/bots/api#message">Message</a>.</li>
|
||||
<li>Fixed an error in <a href="/bots/api#sendchataction">sendChatAction</a> documentation to correctly mention "record_voice" and "upload_voice" instead of "record_audio" and "upload_audio" for related to voice note actions. Old action names will still work for backward compatibility.</li>
|
||||
<li>Fixed an error in <a href="/bots/api#sendchataction">sendChatAction</a> documentation to correctly mention “record_voice” and “upload_voice” instead of “record_audio” and “upload_audio” for related to voice note actions. Old action names will still work for backward compatibility.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<blockquote>
|
||||
<p><strong><img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /> WARNING! <img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /></strong>
|
||||
After the next Bot API update (Bot API 5.3) there will be a one-time change of the value of the field <code>file_unique_id</code> in objects of the type <a href="/bots/api#photosize">PhotoSize</a> and of the fields <code>small_file_unique_id</code> and <code>big_file_unique_id</code> in objects of the type <a href="/bots/api#chatphoto">ChatPhoto</a>.</p>
|
||||
<p><strong><img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /> WARNING! <img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /></strong><br>After the next Bot API update (Bot API 5.3) there will be a one-time change of the value of the field <code>file_unique_id</code> in objects of the type <a href="/bots/api#photosize">PhotoSize</a> and of the fields <code>small_file_unique_id</code> and <code>big_file_unique_id</code> in objects of the type <a href="/bots/api#chatphoto">ChatPhoto</a>.</p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<blockquote>
|
||||
<p><strong><img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /> WARNING! <img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /></strong>
|
||||
Service messages about non-bot users joining the chat will be soon removed from large groups. We recommend using the "chat_member" update as a replacement.</p>
|
||||
<p><strong><img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /> WARNING! <img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /></strong><br>Service messages about non-bot users joining the chat will be soon removed from large groups. We recommend using the “chat_member” update as a replacement.</p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<blockquote>
|
||||
<p><strong><img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /> WARNING! <img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /></strong>
|
||||
After one of the upcoming Bot API updates, user identifiers will become bigger than <code>2^31 - 1</code> and it will be no longer possible to store them in a signed 32-bit integer type. User identifiers will have up to 52 significant bits, so a 64-bit integer or double-precision float type would still be safe for storing them. Please make sure that your code can correctly handle such user identifiers.</p>
|
||||
<p><strong><img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /> WARNING! <img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /></strong><br>After one of the upcoming Bot API updates, user identifiers will become bigger than <code>2^31 - 1</code> and it will be no longer possible to store them in a signed 32-bit integer type. User identifiers will have up to 52 significant bits, so a 64-bit integer or double-precision float type would still be safe for storing them. Please make sure that your code can correctly handle such user identifiers.</p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<h4><a class="anchor" href="#march-9-2021" id="march-9-2021" name="march-9-2021"><i class="anchor-icon"></i></a>March 9, 2021</h4>
|
||||
<h4><a class="anchor" name="march-9-2021" href="#march-9-2021"><i class="anchor-icon"></i></a>March 9, 2021</h4>
|
||||
<p><strong>Bot API 5.1</strong></p>
|
||||
<p><strong>Added two new update types</strong></p>
|
||||
<ul>
|
||||
|
@ -341,16 +346,15 @@ After one of the upcoming Bot API updates, user identifiers will become bigger t
|
|||
</ul>
|
||||
<hr>
|
||||
<blockquote>
|
||||
<p><strong><img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /> WARNING! <img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /></strong>
|
||||
After one of the upcoming Bot API updates, some user identifiers will become bigger than <code>2^31 - 1</code> and it will be no longer possible to store them in a signed 32-bit integer type. User identifiers will have up to 52 significant bits, so a 64-bit integer or double-precision float type would still be safe for storing them. Please make sure that your code can correctly handle such user identifiers.</p>
|
||||
<p><strong><img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /> WARNING! <img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /></strong><br>After one of the upcoming Bot API updates, some user identifiers will become bigger than <code>2^31 - 1</code> and it will be no longer possible to store them in a signed 32-bit integer type. User identifiers will have up to 52 significant bits, so a 64-bit integer or double-precision float type would still be safe for storing them. Please make sure that your code can correctly handle such user identifiers.</p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<h3><a class="anchor" href="#2020" id="2020" name="2020"><i class="anchor-icon"></i></a>2020</h3>
|
||||
<h4><a class="anchor" href="#november-4-2020" id="november-4-2020" name="november-4-2020"><i class="anchor-icon"></i></a>November 4, 2020</h4>
|
||||
<h3><a class="anchor" name="2020" href="#2020"><i class="anchor-icon"></i></a>2020</h3>
|
||||
<h4><a class="anchor" name="november-4-2020" href="#november-4-2020"><i class="anchor-icon"></i></a>November 4, 2020</h4>
|
||||
<p>Introducing <strong>Bot API 5.0</strong></p>
|
||||
<p><strong>Run Your Own Bot API Server</strong></p>
|
||||
<ul>
|
||||
<li>Bot API source code is now available at <a href="https://github.com/tdlib/telegram-bot-api">telegram-bot-api</a>. You can now run your <strong>own Bot API server</strong> locally, boosting your bots' performance.</li>
|
||||
<li>Bot API source code is now available at <a href="https://github.com/tdlib/telegram-bot-api">telegram-bot-api</a>. You can now run your <strong>own Bot API server</strong> locally, boosting your bots' performance.</li>
|
||||
<li>Added the method <a href="/bots/api#logout">logOut</a>, which can be used to log out from the cloud Bot API server before launching your bot locally. You <strong>must</strong> log out the bot before running it locally, otherwise there is no guarantee that the bot will receive all updates.</li>
|
||||
<li>Added the method <a href="/bots/api#close">close</a>, which can be used to close the bot instance before moving it from one local server to another.</li>
|
||||
</ul>
|
||||
|
@ -366,7 +370,7 @@ After one of the upcoming Bot API updates, some user identifiers will become big
|
|||
</ul>
|
||||
<p><strong>Working with Groups</strong></p>
|
||||
<ul>
|
||||
<li>The <a href="/bots/api#getchat">getChat</a> request now returns the user's bio for private chats if available.</li>
|
||||
<li>The <a href="/bots/api#getchat">getChat</a> request now returns the user's bio for private chats if available.</li>
|
||||
<li>The <a href="/bots/api#getchat">getChat</a> request now returns the identifier of the linked chat for supergroups and channels, i.e. the discussion group identifier for a channel and vice versa.</li>
|
||||
<li>The <a href="/bots/api#getchat">getChat</a> request now returns the location to which the supergroup is connected (see <a href="https://telegram.org/blog/contacts-local-groups">Local Groups</a>). Added the class <a href="/bots/api#chatlocation">ChatLocation</a> to represent the location.</li>
|
||||
<li>Added the parameter <em>only_if_banned</em> to the method <a href="/bots/api#unbanchatmember">unbanChatMember</a> to allow safe unban.</li>
|
||||
|
@ -389,7 +393,7 @@ After one of the upcoming Bot API updates, some user identifiers will become big
|
|||
<p><strong>Live Locations</strong></p>
|
||||
<ul>
|
||||
<li>Added the field <em>live_period</em> to the class <a href="/bots/api#location">Location</a>, representing a maximum period for which the live location can be updated.</li>
|
||||
<li>Added support for live location [heading](<a href="https://en.wikipedia.org/wiki/Heading_(navigation&#41">https://en.wikipedia.org/wiki/Heading_(navigation&#41</a>;): added the field <em>heading</em> to the classes <a href="/bots/api#location">Location</a>, <a href="/bots/api#inlinequeryresultlocation">InlineQueryResultLocation</a>, <a href="/bots/api#inputlocationmessagecontent">InputLocationMessageContent</a> and the parameter <em>heading</em> to the methods <a href="/bots/api#sendlocation">sendLocation</a> and <a href="/bots/api#editmessagelivelocation">editMessageLiveLocation</a>.</li>
|
||||
<li>Added support for live location <a href="https://en.wikipedia.org/wiki/Heading_(navigation)">heading</a>: added the field <em>heading</em> to the classes <a href="/bots/api#location">Location</a>, <a href="/bots/api#inlinequeryresultlocation">InlineQueryResultLocation</a>, <a href="/bots/api#inputlocationmessagecontent">InputLocationMessageContent</a> and the parameter <em>heading</em> to the methods <a href="/bots/api#sendlocation">sendLocation</a> and <a href="/bots/api#editmessagelivelocation">editMessageLiveLocation</a>.</li>
|
||||
<li>Added support for proximity alerts in live locations: added the field <em>proximity_alert_radius</em> to the classes <a href="/bots/api#location">Location</a>, <a href="/bots/api#inlinequeryresultlocation">InlineQueryResultLocation</a>, <a href="/bots/api#inputlocationmessagecontent">InputLocationMessageContent</a> and the parameter <em>proximity_alert_radius</em> to the methods <a href="/bots/api#sendlocation">sendLocation</a> and <a href="/bots/api#editmessagelivelocation">editMessageLiveLocation</a>.</li>
|
||||
<li>Added the type <a href="/bots/api#proximityalerttriggered">ProximityAlertTriggered</a> and the field <em>proximity_alert_triggered</em> to the class <a href="/bots/api#message">Message</a>.</li>
|
||||
<li>Added possibility to specify the horizontal accuracy of a location. Added the field <em>horizontal_accuracy</em> to the classes <a href="/bots/api#location">Location</a>, <a href="/bots/api#inlinequeryresultlocation">InlineQueryResultLocation</a>, <a href="/bots/api#inputlocationmessagecontent">InputLocationMessageContent</a> and the parameter <em>horizontal_accuracy</em> to the methods <a href="/bots/api#sendlocation">sendLocation</a> and <a href="/bots/api#editmessagelivelocation">editMessageLiveLocation</a>.</li>
|
||||
|
@ -413,14 +417,14 @@ After one of the upcoming Bot API updates, some user identifiers will become big
|
|||
<ul>
|
||||
<li>Supported the new <strong>football</strong> and <strong>slot machine</strong> animations for the random <a href="/bots/api#dice">dice</a>. Choose between different animations (dice, darts, basketball, football, slot machine) by specifying the <em>emoji</em> parameter in the method <a href="/bots/api#senddice">sendDice</a>.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#june-4-2020" id="june-4-2020" name="june-4-2020"><i class="anchor-icon"></i></a>June 4, 2020</h4>
|
||||
<h4><a class="anchor" name="june-4-2020" href="#june-4-2020"><i class="anchor-icon"></i></a>June 4, 2020</h4>
|
||||
<p><strong>Bot API 4.9</strong></p>
|
||||
<ul>
|
||||
<li>Added the new field <em>via_bot</em> to the <a href="/bots/api#message">Message</a> object. You can now know which bot was used to send a message.</li>
|
||||
<li>Supported video thumbnails for inline <a href="/bots/api#inlinequeryresultgif">GIF</a> and <a href="/bots/api#inlinequeryresultmpeg4gif">MPEG4</a> animations.</li>
|
||||
<li>Supported the new basketball animation for the random <a href="/bots/api#dice">dice</a>. Choose between different animations (dice, darts, basketball) by specifying the <em>emoji</em> parameter in the method <a href="/bots/api#senddice">sendDice</a>.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#april-24-2020" id="april-24-2020" name="april-24-2020"><i class="anchor-icon"></i></a>April 24, 2020</h4>
|
||||
<h4><a class="anchor" name="april-24-2020" href="#april-24-2020"><i class="anchor-icon"></i></a>April 24, 2020</h4>
|
||||
<p><strong>Bot API 4.8</strong></p>
|
||||
<ul>
|
||||
<li>Supported explanations for <a href="https://telegram.org/blog/400-million#better-quizzes">Quizzes 2.0</a>. Add explanations by specifying the parameters <em>explanation</em> and <em>explanation_parse_mode</em> in the method <a href="/bots/api#sendpoll">sendPoll</a>.</li>
|
||||
|
@ -430,19 +434,19 @@ After one of the upcoming Bot API updates, some user identifiers will become big
|
|||
<li>Supported the new <a href="https://telegram.org/blog/400-million#bullseye">darts</a> animation for the dice mini-game. Choose between the default dice animation and darts animation by specifying the parameter <em>emoji</em> in the method <a href="/bots/api#senddice">sendDice</a>.</li>
|
||||
<li>Added the field <em>emoji</em> to the <a href="/bots/api#dice">Dice</a> object.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#march-30-2020" id="march-30-2020" name="march-30-2020"><i class="anchor-icon"></i></a>March 30, 2020</h4>
|
||||
<h4><a class="anchor" name="march-30-2020" href="#march-30-2020"><i class="anchor-icon"></i></a>March 30, 2020</h4>
|
||||
<p><strong>Bot API 4.7</strong></p>
|
||||
<ul>
|
||||
<li>Added the method <a href="/bots/api#senddice">sendDice</a> for sending a dice message, which will have a random value from 1 to 6. (Yes, we're aware of the <em>"proper"</em> singular of <em>die</em>. But it's awkward, and we decided to help it change. One dice at a time!)</li>
|
||||
<li>Added the method <a href="/bots/api#senddice">sendDice</a> for sending a dice message, which will have a random value from 1 to 6. (Yes, we're aware of the <em>“proper”</em> singular of <em>die</em>. But it's awkward, and we decided to help it change. One dice at a time!)</li>
|
||||
<li>Added the field <a href="/bots/api#dice">dice</a> to the <a href="/bots/api#message">Message</a> object.</li>
|
||||
<li>Added the method <a href="/bots/api#getmycommands">getMyCommands</a> for getting the current list of the bot's commands.</li>
|
||||
<li>Added the method <a href="/bots/api#setmycommands">setMyCommands</a> for changing the list of the bot's commands through the Bot API instead of <a href="https://t.me/botfather">@BotFather</a>.</li>
|
||||
<li>Added the method <a href="/bots/api#getmycommands">getMyCommands</a> for getting the current list of the bot's commands.</li>
|
||||
<li>Added the method <a href="/bots/api#setmycommands">setMyCommands</a> for changing the list of the bot's commands through the Bot API instead of <a href="https://t.me/botfather">@BotFather</a>.</li>
|
||||
<li>Added the ability to create animated sticker sets by specifying the parameter <em>tgs_sticker</em> instead of <em>png_sticker</em> in the method <a href="/bots/api#createnewstickerset">createNewStickerSet</a>.</li>
|
||||
<li>Added the ability to add animated stickers to sets created by the bot by specifying the parameter <em>tgs_sticker</em> instead of <em>png_sticker</em> in the method <a href="/bots/api#addstickertoset">addStickerToSet</a>.</li>
|
||||
<li>Added the field <em>thumb</em> to the <a href="/bots/api#stickerset">StickerSet</a> object.</li>
|
||||
<li>Added the ability to change thumbnails of sticker sets created by the bot using the method <a href="/bots/api#setstickersetthumb">setStickerSetThumb</a>.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#january-23-2020" id="january-23-2020" name="january-23-2020"><i class="anchor-icon"></i></a>January 23, 2020</h4>
|
||||
<h4><a class="anchor" name="january-23-2020" href="#january-23-2020"><i class="anchor-icon"></i></a>January 23, 2020</h4>
|
||||
<p><strong>Bot API 4.6</strong></p>
|
||||
<ul>
|
||||
<li>Supported <a href="https://telegram.org/blog/polls-2-0-vmq">Polls 2.0</a>.</li>
|
||||
|
@ -454,20 +458,20 @@ After one of the upcoming Bot API updates, some user identifiers will become big
|
|||
<li>Added more information about the bot in response to the <a href="/bots/api#getme">getMe</a> request: added the fields <em>can_join_groups</em>, <em>can_read_all_group_messages</em> and <em>supports_inline_queries</em> to the <a href="/bots/api#user">User</a> object.</li>
|
||||
<li>Added the optional field <em>language</em> to the <a href="/bots/api#messageentity">MessageEntity</a> object.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" href="#2019" id="2019" name="2019"><i class="anchor-icon"></i></a>2019</h3>
|
||||
<h4><a class="anchor" href="#december-31-2019" id="december-31-2019" name="december-31-2019"><i class="anchor-icon"></i></a>December 31, 2019</h4>
|
||||
<h3><a class="anchor" name="2019" href="#2019"><i class="anchor-icon"></i></a>2019</h3>
|
||||
<h4><a class="anchor" name="december-31-2019" href="#december-31-2019"><i class="anchor-icon"></i></a>December 31, 2019</h4>
|
||||
<p><strong>Bot API 4.5</strong></p>
|
||||
<ul>
|
||||
<li>Added support for two new <a href="/bots/api#messageentity">MessageEntity</a> types, <em>underline</em> and <em>strikethrough</em>.</li>
|
||||
<li>Added support for nested <a href="/bots/api#messageentity">MessageEntity</a> objects. Entities can now contain other entities. If two entities have common characters then one of them is fully contained inside the other.</li>
|
||||
<li>Added support for nested entities and the new tags <code><u>/<ins></code> (for underlined text) and <code><s>/<strike>/<del></code> (for strikethrough text) in parse mode HTML.</li>
|
||||
<li>Added a new parse mode, <a href="/bots/api#markdownv2-style">MarkdownV2</a>, which supports nested entities and two new entities <code>__</code> (for underlined text) and <code>~</code> (for strikethrough text). Parse mode <a href="/bots/api#markdown-style">Markdown</a> remains unchanged for backward compatibility.</li>
|
||||
<li>Added the field <em>file_unique_id</em> to the objects <a href="/bots/api#animation">Animation</a>, <a href="/bots/api#audio">Audio</a>, <a href="/bots/api#document">Document</a>, <a href="/bots/api#passportfile">PassportFile</a>, <a href="/bots/api#photosize">PhotoSize</a>, <a href="/bots/api#sticker">Sticker</a>, <a href="/bots/api#video">Video</a>, <a href="/bots/api#videonote">VideoNote</a>, <a href="/bots/api#voice">Voice</a>, <a href="/bots/api#file">File</a> and the fields <em>small_file_unique_id</em> and <em>big_file_unique_id</em> to the object <a href="/bots/api#chatphoto">ChatPhoto</a>. The new fields contain a unique file identifier, which is supposed to be the same over time and for different bots, but can't be used to download or reuse the file.</li>
|
||||
<li>Added the field <em>file_unique_id</em> to the objects <a href="/bots/api#animation">Animation</a>, <a href="/bots/api#audio">Audio</a>, <a href="/bots/api#document">Document</a>, <a href="/bots/api#passportfile">PassportFile</a>, <a href="/bots/api#photosize">PhotoSize</a>, <a href="/bots/api#sticker">Sticker</a>, <a href="/bots/api#video">Video</a>, <a href="/bots/api#videonote">VideoNote</a>, <a href="/bots/api#voice">Voice</a>, <a href="/bots/api#file">File</a> and the fields <em>small_file_unique_id</em> and <em>big_file_unique_id</em> to the object <a href="/bots/api#chatphoto">ChatPhoto</a>. The new fields contain a unique file identifier, which is supposed to be the same over time and for different bots, but can't be used to download or reuse the file.</li>
|
||||
<li>Added the field <em>custom_title</em> to the <a href="/bots/api#chatmember">ChatMember</a> object.</li>
|
||||
<li>Added the new method <a href="/bots/api#setchatadministratorcustomtitle">setChatAdministratorCustomTitle</a> to manage the custom titles of administrators promoted by the bot.</li>
|
||||
<li>Added the field <em>slow_mode_delay</em> to the <a href="/bots/api#chat">Chat</a> object.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#july-29-2019" id="july-29-2019" name="july-29-2019"><i class="anchor-icon"></i></a>July 29, 2019</h4>
|
||||
<h4><a class="anchor" name="july-29-2019" href="#july-29-2019"><i class="anchor-icon"></i></a>July 29, 2019</h4>
|
||||
<p><strong>Bot API 4.4</strong></p>
|
||||
<ul>
|
||||
<li>Added support for <a href="https://telegram.org/blog/animated-stickers"><strong>animated stickers</strong></a>. New field <em>is_animated</em> in <a href="/bots/api#sticker">Sticker</a> and <a href="/bots/api#stickerset">StickerSet</a> objects, animated stickers can now be used in <a href="/bots/api#sendsticker">sendSticker</a> and <a href="/bots/api#inlinequeryresultcachedsticker">InlineQueryResultCachedSticker</a>.</li>
|
||||
|
@ -475,49 +479,50 @@ After one of the upcoming Bot API updates, some user identifiers will become big
|
|||
<li>The field <em>all_members_are_administrators</em> has been removed from the documentation for the <a href="/bots/api#chat">Chat</a> object. The field is still returned in the object for backward compatibility, but new bots should use the <em>permissions</em> field instead.</li>
|
||||
<li>Added support for more permissions for group and supergroup members: added the new field <em>can_send_polls</em> to <a href="/bots/api#chatmember">ChatMember</a> object, added <em>can_change_info</em>, <em>can_invite_users</em>, <em>can_pin_messages</em> in <a href="/bots/api#chatmember">ChatMember</a> object for restricted users (previously available only for administrators).</li>
|
||||
<li>The method <a href="/bots/api#restrictchatmember">restrictChatMember</a> now takes the new user permissions in a single argument of the type <a href="/bots/api#chatpermissions">ChatPermissions</a>. The old way of passing parameters will keep working for a while for backward compatibility.</li>
|
||||
<li>Added <em>description</em> support for basic groups (previously available in supergroups and channel chats). You can pass a group's chat_id to <a href="/bots/api#setchatdescription">setChatDescription</a> and receive the group's description in the <a href="/bots/api#chat">Chat</a> object in the response to <a href="/bots/api#getchat">getChat</a> method.</li>
|
||||
<li>Added <em>invite_link</em> support for basic groups (previously available in supergroups and channel chats). You can pass a group's chat_id to <a href="/bots/api#exportchatinvitelink">exportChatInviteLink</a> and receive the group's invite link in the <a href="/bots/api#chat">Chat</a> object in the response to <a href="/bots/api#getchat">getChat</a> method.</li>
|
||||
<li>Added <em>description</em> support for basic groups (previously available in supergroups and channel chats). You can pass a group's chat_id to <a href="/bots/api#setchatdescription">setChatDescription</a> and receive the group's description in the <a href="/bots/api#chat">Chat</a> object in the response to <a href="/bots/api#getchat">getChat</a> method.</li>
|
||||
<li>Added <em>invite_link</em> support for basic groups (previously available in supergroups and channel chats). You can pass a group's chat_id to <a href="/bots/api#exportchatinvitelink">exportChatInviteLink</a> and receive the group's invite link in the <a href="/bots/api#chat">Chat</a> object in the response to <a href="/bots/api#getchat">getChat</a> method.</li>
|
||||
<li>File identifiers from the <a href="/bots/api#chatphoto">ChatPhoto</a> object are now invalidated and can no longer be used whenever the photo is changed.</li>
|
||||
<li>All <strong>webhook requests</strong> from the Bot API are now coming from the subnets <code>149.154.160.0/20</code> and <code>91.108.4.0/22</code>. Most users won't need to do anything to continue receiving webhooks. If you control inbound access with a firewall, you may need to update your configuration. You can always find the list of actual IP addresses of servers used to send webhooks there: <a href="/bots/webhooks">https://core.telegram.org/bots/webhooks</a>.</li>
|
||||
<li>All <strong>webhook requests</strong> from the Bot API are now coming from the subnets <code>149.154.160.0/20</code> and <code>91.108.4.0/22</code>. Most users won't need to do anything to continue receiving webhooks. If you control inbound access with a firewall, you may need to update your configuration. You can always find the list of actual IP addresses of servers used to send webhooks there: <a href="/bots/webhooks"><a href="https://core.telegram.org/bots/webhooks">https://core.telegram.org/bots/webhooks</a></a>.</li>
|
||||
<li>As of the <strong>next Bot API</strong> update (<strong>version 4.5</strong>), nested <a href="/bots/api#messageentity">MessageEntity</a> objects will be allowed in message texts and captions. Please make sure that your code can correctly handle such entities.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#may-31-2019" id="may-31-2019" name="may-31-2019"><i class="anchor-icon"></i></a>May 31, 2019</h4>
|
||||
<h4><a class="anchor" name="may-31-2019" href="#may-31-2019"><i class="anchor-icon"></i></a>May 31, 2019</h4>
|
||||
<p><strong>Bot API 4.3</strong></p>
|
||||
<ul>
|
||||
<li>Added support for <a href="https://telegram.org/blog/privacy-discussions-web-bots#meet-seamless-web-bots"><strong>Seamless Telegram Login</strong></a> on external websites.</li>
|
||||
<li>Added the new object <a href="/bots/api#loginurl">LoginUrl</a> and the new field <em>login_url</em> to the <a href="/bots/api#inlinekeyboardbutton">InlineKeyboardButton</a> object which allows to <strong>automatically authorize</strong> users before they go to a URL specified by the bot. Users will be asked to confirm authorization in their Telegram app (needs version 5.7 or higher) when they press the button:</li>
|
||||
</ul>
|
||||
<div class="blog_image_wrap">
|
||||
<a href="/file/811140015/1734/8VZFkwWXalM.97872/6127fa62d8a0bf2b3c" target="_blank"><img src="/file/811140909/1631/20k1Z53eiyY.23995/c541e89b74253623d9" title="TITLE" alt="TITLE" srcset="/file/811140015/1734/8VZFkwWXalM.97872/6127fa62d8a0bf2b3c , 2x"></a>
|
||||
<a href="/file/811140015/1734/8VZFkwWXalM.97872/6127fa62d8a0bf2b3c" target="_blank"><img src="/file/811140909/1631/20k1Z53eiyY.23995/c541e89b74253623d9" title="TITLE" alt="TITLE" srcset="/file/811140015/1734/8VZFkwWXalM.97872/6127fa62d8a0bf2b3c , 2x" /></a>
|
||||
</div>
|
||||
|
||||
<p><strong>Also in this update:</strong></p>
|
||||
<ul>
|
||||
<li>Added the field <code>reply_markup</code> to the <a href="/bots/api#message">Message</a> object, containing the inline keyboard attached to the message.</li>
|
||||
<li>If a message with an inline keyboard is forwarded, the forwarded message will now have an inline keyboard if the keyboard contained only <em>url</em> and <em>login_url</em> buttons or if the message was sent via a bot and the keyboard contained only <em>url</em>, <em>login_url</em>, <em>switch_inline_query</em> or <em>switch_inline_query_current_chat</em> buttons. In the latter case, <em>switch_inline_query_current_chat</em> buttons are replaced with <em>switch_inline_query</em> buttons.</li>
|
||||
<li>Bots now receive the <em>edited_message</em> <a href="/bots/api#update">Update</a> even if only <em>Message.reply_markup</em> has changed.</li>
|
||||
<li>Bots that have the <em>can_edit_messages</em> right in a channel can now use the method <a href="/bots/api#editmessagereplymarkup">editMessageReplyMarkup</a> for messages written by other administrators forever without the 48 hours limit.</li>
|
||||
<li>Don't forget that starting in <strong>July 2019</strong>, <strong>webhook requests</strong> from Bot API will be coming from the subnets <code>149.154.160.0/20</code> and <code>91.108.4.0/22</code>. Most users won't need to do anything to continue receiving webhooks. If you control inbound access with a firewall, you may need to update your configuration. You can always find the list of actual IP addresses of servers used to send webhooks there: <a href="/bots/webhooks">https://core.telegram.org/bots/webhooks</a>.</li>
|
||||
<li>Don't forget that starting in <strong>July 2019</strong>, <strong>webhook requests</strong> from Bot API will be coming from the subnets <code>149.154.160.0/20</code> and <code>91.108.4.0/22</code>. Most users won't need to do anything to continue receiving webhooks. If you control inbound access with a firewall, you may need to update your configuration. You can always find the list of actual IP addresses of servers used to send webhooks there: <a href="/bots/webhooks"><a href="https://core.telegram.org/bots/webhooks">https://core.telegram.org/bots/webhooks</a></a>.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#april-14-2019" id="april-14-2019" name="april-14-2019"><i class="anchor-icon"></i></a>April 14, 2019</h4>
|
||||
<h4><a class="anchor" name="april-14-2019" href="#april-14-2019"><i class="anchor-icon"></i></a>April 14, 2019</h4>
|
||||
<p><strong>Bot API 4.2</strong></p>
|
||||
<ul>
|
||||
<li>Added support for native polls: added the object <a href="/bots/api#poll">Poll</a>, the methods <a href="/bots/api#sendpoll">sendPoll</a> and <a href="/bots/api#stoppoll">stopPoll</a> and the field <em>poll</em> in the <a href="/bots/api#message">Message</a> and <a href="/bots/api#update">Update</a> objects.</li>
|
||||
<li>The method <a href="/bots/api#deletemessage">deleteMessage</a> can now be used to delete messages sent by a user to the bot in private chats within 48 hours.</li>
|
||||
<li>Added support for pinned messages in basic groups in addition to supergroups and channel chats: you can pass group's chat_id to <a href="/bots/api#pinchatmessage">pinChatMessage</a> and <a href="/bots/api#unpinchatmessage">unpinChatMessage</a>, and receive the pinned group message in <a href="/bots/api#chat">Chat</a> object.</li>
|
||||
<li>Added support for pinned messages in basic groups in addition to supergroups and channel chats: you can pass group's chat_id to <a href="/bots/api#pinchatmessage">pinChatMessage</a> and <a href="/bots/api#unpinchatmessage">unpinChatMessage</a>, and receive the pinned group message in <a href="/bots/api#chat">Chat</a> object.</li>
|
||||
<li>Added the field <em>is_member</em> to the <a href="/bots/api#chatmember">ChatMember</a> object, which can be used to find whether a restricted user is a member of the chat.</li>
|
||||
<li>Added the field <em>forward_sender_name</em> to the <a href="/bots/api#message">Message</a> object, containing name of the sender who has opted to hide their account.</li>
|
||||
<li>Starting in July 2019, webhook requests from Bot API will be coming from the subnets <code>149.154.160.0/20</code> and <code>91.108.4.0/22</code>. Most users won't need to do anything to continue receiving webhooks. If you control inbound access with a firewall, you may need to update your configuration. You can always find the list of actual IP addresses of servers used to send webhooks there: <a href="/bots/webhooks">https://core.telegram.org/bots/webhooks</a>.</li>
|
||||
<li>Starting in July 2019, webhook requests from Bot API will be coming from the subnets <code>149.154.160.0/20</code> and <code>91.108.4.0/22</code>. Most users won't need to do anything to continue receiving webhooks. If you control inbound access with a firewall, you may need to update your configuration. You can always find the list of actual IP addresses of servers used to send webhooks there: <a href="/bots/webhooks"><a href="https://core.telegram.org/bots/webhooks">https://core.telegram.org/bots/webhooks</a></a>.</li>
|
||||
<li>Document thumbnails now should be inscribed in a 320x320 square instead of 90x90.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" href="#2018" id="2018" name="2018"><i class="anchor-icon"></i></a>2018</h3>
|
||||
<h4><a class="anchor" href="#august-27-2018" id="august-27-2018" name="august-27-2018"><i class="anchor-icon"></i></a>August 27, 2018</h4>
|
||||
<h3><a class="anchor" name="2018" href="#2018"><i class="anchor-icon"></i></a>2018</h3>
|
||||
<h4><a class="anchor" name="august-27-2018" href="#august-27-2018"><i class="anchor-icon"></i></a>August 27, 2018</h4>
|
||||
<p><strong>Bot API 4.1</strong></p>
|
||||
<ul>
|
||||
<li>Added support for translated versions of documents in <a href="/passport">Telegram Passport</a>.</li>
|
||||
<li>New field <em>translation</em> in <a href="/bots/api#encryptedpassportelement">EncryptedPassportElement</a>.</li>
|
||||
<li>New errors: <a href="/bots/api#passportelementerrortranslationfile">PassportElementErrorTranslationFile</a> and <a href="/bots/api#passportelementerrortranslationfile">PassportElementErrorTranslationFiles</a> and <a href="/bots/api#passportelementerrorunspecified">PassportElementErrorUnspecified</a>.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#july-26-2018" id="july-26-2018" name="july-26-2018"><i class="anchor-icon"></i></a>July 26, 2018</h4>
|
||||
<h4><a class="anchor" name="july-26-2018" href="#july-26-2018"><i class="anchor-icon"></i></a>July 26, 2018</h4>
|
||||
<p><strong>Bot API 4.0</strong>.</p>
|
||||
<ul>
|
||||
<li>Added support for <a href="https://telegram.org/blog/passport"><strong>Telegram Passport</strong></a>. See the official announcement on the <a href="https://telegram.org/blog">blog</a> and the <a href="https://core.telegram.org/passport">manual</a> for details.</li>
|
||||
|
@ -529,36 +534,36 @@ After one of the upcoming Bot API updates, some user identifiers will become big
|
|||
<li>Added the field <a href="/bots/api#animation">animation</a> to the <a href="/bots/api#message">Message</a> object. For backward compatibility, when this field is set, the <em>document</em> field will be also set.</li>
|
||||
<li>Added two new <a href="/bots/api#messageentity">MessageEntity</a> types: <em>cashtag</em> and <em>phone_number</em>.</li>
|
||||
<li>Added support for Foursquare venues: added the new field <em>foursquare_type</em> to the objects <a href="/bots/api#venue">Venue</a>, <a href="/bots/api#inlinequeryresultvenue">InlineQueryResultVenue</a> and <a href="/bots/api#inputvenuemessagecontent">InputVenueMessageContent</a>, and the parameter <em>foursquare_type</em> to the <a href="/bots/api#sendvenue">sendVenue</a> method.</li>
|
||||
<li>You can now create inline mentions of users, who have pressed your bot's callback buttons.</li>
|
||||
<li>You can now create inline mentions of users, who have pressed your bot's callback buttons.</li>
|
||||
<li>You can now use the <code>Retry-After</code> response header to configure the delay after which the Bot API will retry the request after an unsuccessful response from a webhook.</li>
|
||||
<li>If a webhook returns the HTTP error <code>410 Gone</code> for all requests for more than 23 hours successively, it can be automatically removed.</li>
|
||||
<li>Added <a href="https://en.wikipedia.org/wiki/VCard">vCard</a> support when sharing contacts: added the field <em>vcard</em> to the objects <a href="/bots/api#contact">Contact</a>, <a href="/bots/api#inlinequeryresultcontact">InlineQueryResultContact</a>, <a href="/bots/api#inputcontactmessagecontent">InputContactMessageContent</a> and the method <a href="/bots/api#sendcontact">sendContact</a>.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#february-13-2018" id="february-13-2018" name="february-13-2018"><i class="anchor-icon"></i></a>February 13, 2018</h4>
|
||||
<h4><a class="anchor" name="february-13-2018" href="#february-13-2018"><i class="anchor-icon"></i></a>February 13, 2018</h4>
|
||||
<p><strong>Bot API 3.6</strong>.</p>
|
||||
<ul>
|
||||
<li>Supported <a href="https://core.telegram.org/bots/api#formatting-options">text formatting</a> in media captions. Specify the desired <em>parse_mode</em> (<a href="https://core.telegram.org/bots/api#markdown-style">Markdown</a> or <a href="https://core.telegram.org/bots/api#html-style">HTML</a>) when you provide a caption.</li>
|
||||
<li>In supergroups, if the bot receives a message that is a reply, it will also receive the message to which that message is replying – even if the original message is inaccessible due to the bot's privacy settings. (In other words, replying to any message in a supergroup with a message that mentions the bot or features a command for it acts as forwarding the original message to the bot). </li>
|
||||
<li>Added the new field <em>connected_website</em> to <a href="/bots/api#message">Message</a>. The bot will receive a message with this field in a private chat when a user logs in on the bot's connected website using the <a href="https://core.telegram.org/widgets/login">Login Widget</a> and allows sending messages from your bot.</li>
|
||||
<li>In supergroups, if the bot receives a message that is a reply, it will also receive the message to which that message is replying – even if the original message is inaccessible due to the bot's privacy settings. (In other words, replying to any message in a supergroup with a message that mentions the bot or features a command for it acts as forwarding the original message to the bot). </li>
|
||||
<li>Added the new field <em>connected_website</em> to <a href="/bots/api#message">Message</a>. The bot will receive a message with this field in a private chat when a user logs in on the bot's connected website using the <a href="https://core.telegram.org/widgets/login">Login Widget</a> and allows sending messages from your bot.</li>
|
||||
<li>Added the new parameter <em>supports_streaming</em> to the <a href="/bots/api#sendvideo">sendVideo</a> method and a field with the same name to the <a href="/bots/api#inputmediavideo">InputMediaVideo</a> object.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" href="#2017" id="2017" name="2017"><i class="anchor-icon"></i></a>2017</h3>
|
||||
<h4><a class="anchor" href="#november-17-2017" id="november-17-2017" name="november-17-2017"><i class="anchor-icon"></i></a>November 17, 2017</h4>
|
||||
<h3><a class="anchor" name="2017" href="#2017"><i class="anchor-icon"></i></a>2017</h3>
|
||||
<h4><a class="anchor" name="november-17-2017" href="#november-17-2017"><i class="anchor-icon"></i></a>November 17, 2017</h4>
|
||||
<p><strong>Bot API 3.5</strong>.</p>
|
||||
<ul>
|
||||
<li>Added the new method <a href="/bots/api#sendmediagroup">sendMediaGroup</a> and two kinds of <a href="/bots/api#inputmedia">InputMedia</a> objects to support the new <a href="https://telegram.org/blog/albums-saved-messages">albums feature</a>.</li>
|
||||
<li>Added support for pinning messages in channels. <a href="/bots/api#pinchatmessage">pinChatMessage</a> and <a href="/bots/api#unpinchatmessage">unpinChatMessage</a> accept channels.</li>
|
||||
<li>Added the new fields <em>provider_data</em>, <em>send_phone_number_to_provider</em>, <em>send_email_to_provider</em> to <a href="/bots/api#sendinvoice">sendInvoice</a> for sharing information about the invoice with the payment provider.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#october-11-2017" id="october-11-2017" name="october-11-2017"><i class="anchor-icon"></i></a>October 11, 2017</h4>
|
||||
<h4><a class="anchor" name="october-11-2017" href="#october-11-2017"><i class="anchor-icon"></i></a>October 11, 2017</h4>
|
||||
<p><strong>Bot API 3.4</strong>.</p>
|
||||
<ul>
|
||||
<li>Bots can now send and receive <a href="https://telegram.org/blog/live-locations">Live Locations</a>. Added new field <em>live_period</em> to the <a href="/bots/api#sendlocation">sendLocation</a> method and the <a href="/bots/api#editmessagelivelocation">editMessageLiveLocation</a> and <a href="/bots/api#stopmessagelivelocation">stopMessageLiveLocation</a> methods as well as the necessary objects for inline bots.</li>
|
||||
<li>Bots can use the new <a href="/bots/api#setchatstickerset">setChatStickerSet</a> and <a href="/bots/api#deletechatstickerset">deleteChatStickerSet</a> methods to manage <a href="https://telegram.org/blog#stickers-of-the-group">group sticker sets</a>.</li>
|
||||
<li>The <a href="/bots/api#getchat">getChat</a> request now returns the group's sticker set for supergroups if available.</li>
|
||||
<li>The <a href="/bots/api#getchat">getChat</a> request now returns the group's sticker set for supergroups if available.</li>
|
||||
<li>Bots now receive entities from media captions in the new field <em>caption_entities</em> in <a href="/bots/api#message">Message</a>.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#august-23-2017" id="august-23-2017" name="august-23-2017"><i class="anchor-icon"></i></a>August 23, 2017</h4>
|
||||
<h4><a class="anchor" name="august-23-2017" href="#august-23-2017"><i class="anchor-icon"></i></a>August 23, 2017</h4>
|
||||
<p><strong>Bot API 3.3</strong>.</p>
|
||||
<ul>
|
||||
<li>Bots can now mention users via <a href="/bots/api#formatting-options">inline mentions</a>, without using usernames.</li>
|
||||
|
@ -566,13 +571,13 @@ After one of the upcoming Bot API updates, some user identifiers will become big
|
|||
<li>Added the new fields <em>author_signature</em> and <em>forward_signature</em> to the <a href="/bots/api#message">Message</a> object.</li>
|
||||
<li>Added the new field <em>is_bot</em> to the <a href="/bots/api#user">User</a> object.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#july-21-2017" id="july-21-2017" name="july-21-2017"><i class="anchor-icon"></i></a>July 21, 2017</h4>
|
||||
<h4><a class="anchor" name="july-21-2017" href="#july-21-2017"><i class="anchor-icon"></i></a>July 21, 2017</h4>
|
||||
<p><strong>Bot API 3.2</strong>. Teach your bot to handle <a href="/bots/api#stickers">stickers and sticker sets</a>.</p>
|
||||
<ul>
|
||||
<li>Added new methods for working with stickers: <a href="/bots/api#getstickerset">getStickerSet</a>, <a href="/bots/api#uploadstickerfile">uploadStickerFile</a>, <a href="/bots/api#createnewstickerset">createNewStickerSet</a>, <a href="/bots/api#addstickertoset">addStickerToSet</a>, <a href="/bots/api#setstickerpositioninset">setStickerPositionInSet</a>, and <a href="/bots/api#deletestickerfromset">deleteStickerFromSet</a>.</li>
|
||||
<li>Added the fields <em>set_name</em> and <em>mask_position</em> to the <a href="/bots/api#sticker">Sticker</a> object, plus two new objects, <a href="/bots/api#stickerset">StickerSet</a>, and <a href="/bots/api#maskposition">MaskPosition</a>.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#june-30-2017" id="june-30-2017" name="june-30-2017"><i class="anchor-icon"></i></a>June 30, 2017</h4>
|
||||
<h4><a class="anchor" name="june-30-2017" href="#june-30-2017"><i class="anchor-icon"></i></a>June 30, 2017</h4>
|
||||
<p><strong>Bot API 3.1</strong>. Build your own robotic police force for supergoups with these new methods for admin bots:</p>
|
||||
<ul>
|
||||
<li>Added new methods <a href="/bots/api#restrictchatmember">restrictChatMember</a> and <a href="/bots/api#promotechatmember">promoteChatMember</a> to manage users and admins, added new parameter <em>until_date</em> to <a href="/bots/api#kickchatmember">kickChatMember</a> for temporary bans.</li>
|
||||
|
@ -580,10 +585,10 @@ After one of the upcoming Bot API updates, some user identifiers will become big
|
|||
<li>Added the new fields <em>photo</em>, <em>description</em> and <em>invite_link</em> to the <a href="/bots/api#chat">Chat</a> object.</li>
|
||||
<li>Added the new fields <em>until_date</em>, <em>can_be_edited</em>, <em>can_change_info</em>, <em>can_post_messages</em>, <em>can_edit_messages</em>, <em>can_delete_messages</em>, <em>can_invite_users</em>, <em>can_restrict_members</em>, <em>can_pin_messages</em>, <em>can_promote_members</em>, <em>can_send_messages</em>, <em>can_send_media_messages</em>, <em>can_send_other_messages</em> and <em>can_add_web_page_previews</em> to the <a href="/bots/api#chatmember">ChatMember</a> object.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#may-18-2017" id="may-18-2017" name="may-18-2017"><i class="anchor-icon"></i></a>May 18, 2017</h4>
|
||||
<h4><a class="anchor" name="may-18-2017" href="#may-18-2017"><i class="anchor-icon"></i></a>May 18, 2017</h4>
|
||||
<p>Introducing <strong>Bot API 3.0</strong>.</p>
|
||||
<p><strong>NEW Payment Platform</strong></p>
|
||||
<p>See <a href="/bots/payments">Introduction to Bot Payments</a> for a brief overview. If you're not a developer, you may like <a href="https://telegram.org/blog/payments">this user-friendly blog post</a> better.</p>
|
||||
<p>See <a href="/bots/payments">Introduction to Bot Payments</a> for a brief overview. If you're not a developer, you may like <a href="https://telegram.org/blog/payments">this user-friendly blog post</a> better.</p>
|
||||
<ul>
|
||||
<li>Your bot can now accept <a href="/bots/api#payments">payments</a> for goods and services via Telegram. </li>
|
||||
<li>Added new kinds of <a href="/bots/api#update">updates</a>, <em>shipping_query</em> and <em>pre_checkout_query</em>, and new types of <a href="/bots/api#message">message</a> content, <em>invoice</em> and <em>successful_payment</em>.</li>
|
||||
|
@ -597,7 +602,7 @@ After one of the upcoming Bot API updates, some user identifiers will become big
|
|||
</ul>
|
||||
<p><strong>NEW Multilingual Bots</strong></p>
|
||||
<ul>
|
||||
<li>The <a href="/bots/api#user">User</a> object now may have a <em>language_code</em> field that contains the <a href="https://en.wikipedia.org/wiki/IETF_language_tag">IETF language tag</a> of the user's language.</li>
|
||||
<li>The <a href="/bots/api#user">User</a> object now may have a <em>language_code</em> field that contains the <a href="https://en.wikipedia.org/wiki/IETF_language_tag">IETF language tag</a> of the user's language.</li>
|
||||
<li>Thanks to this, your bot can now offer localized responses to users that speak different languages.</li>
|
||||
</ul>
|
||||
<p><strong>More power to admin bots</strong></p>
|
||||
|
@ -611,45 +616,30 @@ After one of the upcoming Bot API updates, some user identifiers will become big
|
|||
<li><a href="https://core.telegram.org/bots/api#inlinekeyboardbutton">Inline keyboards</a> with <em>switch_inline_query</em> and <em>switch_inline_query_current_chat</em> can no longer be sent to channels because they are useless there.</li>
|
||||
<li>New fields <em>gif_duration</em> in <a href="/bots/api#inlinequeryresultgif">InlineQueryResultGif</a> and <em>mpeg4_duration</em> in <a href="/bots/api#inlinequeryresultmpeg4gif">InlineQueryResultMpeg4Gif</a>.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" href="#2016" id="2016" name="2016"><i class="anchor-icon"></i></a>2016</h3>
|
||||
<h4><a class="anchor" href="#december-4-2016" id="december-4-2016" name="december-4-2016"><i class="anchor-icon"></i></a>December 4, 2016</h4>
|
||||
<h3><a class="anchor" name="2016" href="#2016"><i class="anchor-icon"></i></a>2016</h3>
|
||||
<h4><a class="anchor" name="december-4-2016" href="#december-4-2016"><i class="anchor-icon"></i></a>December 4, 2016</h4>
|
||||
<p>Introducing <strong>Bot API 2.3.1</strong>, a nifty little update that will give you more control over how your bot gets its updates.</p>
|
||||
<ul>
|
||||
<li>Use the new field <em>max_connections</em> in <a href="/bots/api#setwebhook">setWebhook</a> to optimize your bot's server load</li>
|
||||
<li>Use the new field <em>max_connections</em> in <a href="/bots/api#setwebhook">setWebhook</a> to optimize your bot's server load</li>
|
||||
<li>Use <em>allowed_updates</em> in <a href="/bots/api#setwebhook">setWebhook</a> and <a href="/bots/api#getupdates">getUpdates</a> to selectively subscribe to updates of a certain type. Among other things, this allows you to stop getting updates about new posts in channels where your bot is an admin.</li>
|
||||
<li><a href="/bots/api#deletewebhook">deleteWebhook</a> moved out of <a href="/bots/api#setwebhook">setWebhook</a> to get a whole separate method for itself.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#november-21-2016" id="november-21-2016" name="november-21-2016"><i class="anchor-icon"></i></a>November 21, 2016</h4>
|
||||
<h4><a class="anchor" name="november-21-2016" href="#november-21-2016"><i class="anchor-icon"></i></a>November 21, 2016</h4>
|
||||
<p><strong>Bot API 2.3</strong></p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Modified <a href="/bots/faq#what-messages-will-my-bot-get"><strong>bot privacy mode</strong></a> for the sake of consistency. </p>
|
||||
<li>Modified <a href="/bots/faq#what-messages-will-my-bot-get"><strong>bot privacy mode</strong></a> for the sake of consistency. </li>
|
||||
<li><p>Your bot can now get <strong>updates about posts in channels</strong>. Added new fields <em>channel_post</em> and <em>edited_channel_post</em> to <a href="/bots/#update">Update</a>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Your bot can now get <strong>updates about posts in channels</strong>. Added new fields <em>channel_post</em> and <em>edited_channel_post</em> to <a href="/bots/#update">Update</a>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>You can now update high scores to a lower value by using the new <em>force</em> parameter in <a href="/bots/#setgamescore">setGameScore</a>. Handy for punishing <strong>cheaters</strong> or fixing errors in your game's High Score table.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Starting today, messages with high scores will be updated with new high scores by default. Use <em>disable_edit_message</em> in <a href="/bots/#setgamescore">setGameScore</a> if you don't want this.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>The <em>edit_message</em> parameter from <a href="/bots/#setgamescore">setGameScore</a> is no longer in use. For backward compatibility, it will be taken into account for a while, unless <em>disable_edit_message</em> is passed explicitly.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Added the new field <em>forward_from_message_id</em> to <a href="/bots/#message">Message</a>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Added the new parameter <em>cache_time</em> to <a href="/bots/#answercallbackquery">answerCallbackQuery</a>. Will eventually work in Telegram apps — somewhere after version 3.14, maybe 3.15.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Renamed <em>hide_keyboard</em> to <em>remove_keyboard</em> in <a href="/bots/#replykeyboardremove">ReplyKeyboardRemove</a> for clarity. <em>hide_keyboard</em> will still work for a while for backward compatibility.</p>
|
||||
<li><p>You can now update high scores to a lower value by using the new <em>force</em> parameter in <a href="/bots/#setgamescore">setGameScore</a>. Handy for punishing <strong>cheaters</strong> or fixing errors in your game's High Score table.</p>
|
||||
</li>
|
||||
<li>Starting today, messages with high scores will be updated with new high scores by default. Use <em>disable_edit_message</em> in <a href="/bots/#setgamescore">setGameScore</a> if you don't want this.</li>
|
||||
<li>The <em>edit_message</em> parameter from <a href="/bots/#setgamescore">setGameScore</a> is no longer in use. For backward compatibility, it will be taken into account for a while, unless <em>disable_edit_message</em> is passed explicitly.</li>
|
||||
<li>Added the new field <em>forward_from_message_id</em> to <a href="/bots/#message">Message</a>.</li>
|
||||
<li>Added the new parameter <em>cache_time</em> to <a href="/bots/#answercallbackquery">answerCallbackQuery</a>. Will eventually work in Telegram apps — somewhere after version 3.14, maybe 3.15.</li>
|
||||
<li>Renamed <em>hide_keyboard</em> to <em>remove_keyboard</em> in <a href="/bots/#replykeyboardremove">ReplyKeyboardRemove</a> for clarity. <em>hide_keyboard</em> will still work for a while for backward compatibility.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#october-3-2016" id="october-3-2016" name="october-3-2016"><i class="anchor-icon"></i></a>October 3, 2016</h4>
|
||||
<p><strong>Bot API 2.2.</strong> <a href="/bots/games">Introducing a new Gaming Platform!</a> See <a href="/bots/games">this introduction</a> for a brief overview.
|
||||
If you're not a developer, you may like <a href="https://telegram.org/blog/games"><strong>this user-friendly blog post</strong></a> better.</p>
|
||||
<h4><a class="anchor" name="october-3-2016" href="#october-3-2016"><i class="anchor-icon"></i></a>October 3, 2016</h4>
|
||||
<p><strong>Bot API 2.2.</strong> <a href="/bots/games">Introducing a new Gaming Platform!</a> See <a href="/bots/games">this introduction</a> for a brief overview.<br>If you're not a developer, you may like <a href="https://telegram.org/blog/games"><strong>this user-friendly blog post</strong></a> better.</p>
|
||||
<ul>
|
||||
<li>New tools for building <a href="/bots/api#games"><strong>HTML5 games</strong></a>.</li>
|
||||
<li>New method <a href="/bots/api#sendgame">sendGame</a>, new object <a href="/bots/api#inlinequeryresultgame">InlineQueryResultGame</a>, new field <em>game</em> in <a href="/bots/api#message">Message</a>.</li>
|
||||
|
@ -659,50 +649,40 @@ If you're not a developer, you may like <a href="https://telegram.org/blog/games
|
|||
</ul>
|
||||
<p><strong>Other changes</strong></p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Making life easier for webhook users. Added a detailed <a href="https://core.telegram.org/bots/webhooks"><strong>Guide to All Things Webhook</strong></a> that describes every pothole you can run into on the webhook road.</p>
|
||||
<li>Making life easier for webhook users. Added a detailed <a href="https://core.telegram.org/bots/webhooks"><strong>Guide to All Things Webhook</strong></a> that describes every pothole you can run into on the webhook road.</li>
|
||||
<li><p>New method <a href="/bots/api#getwebhookinfo">getWebhookInfo</a> to check current webhook status.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>New method <a href="/bots/api#getwebhookinfo">getWebhookInfo</a> to check current webhook status.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Added the option to specify an <strong>HTTP URL</strong> for a file in all methods where <a href="/bots/api#inputfile">InputFile</a> or <em>file_id</em> can be used (except voice messages). Telegram will get the file from the specified URL and send it to the user. Files must be smaller than 5 MB for photos and smaller than 20 MB for all other types of content.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Use the new <em>url</em> parameter in <a href="/bots/api#answercallbackquery">answerCallbackQuery</a> to create buttons that open your bot with user-specific parameters.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Added new field <em>switch_inline_query_current_chat</em> in <a href="/bots/api#inlinekeyboardbutton">InlineKeyboardButton</a>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Added <em>caption</em> fields to <a href="/bots/api#sendaudio">sendAudio</a>, <a href="/bots/api#sendvoice">sendVoice</a>, <a href="/bots/api#inlinequeryresultaudio">InlineQueryResultAudio</a>, <a href="/bots/api#inlinequeryresultvoice">InlineQueryResultVoice</a>, <a href="/bots/api#inlinequeryresultcachedaudio">InlineQueryResultCachedAudio</a>, and <a href="/bots/api#inlinequeryresultcachedvoice">InlineQueryResultCachedVoice</a>.</p>
|
||||
<li><p>Added the option to specify an <strong>HTTP URL</strong> for a file in all methods where <a href="/bots/api#inputfile">InputFile</a> or <em>file_id</em> can be used (except voice messages). Telegram will get the file from the specified URL and send it to the user. Files must be smaller than 5 MB for photos and smaller than 20 MB for all other types of content.</p>
|
||||
</li>
|
||||
<li>Use the new <em>url</em> parameter in <a href="/bots/api#answercallbackquery">answerCallbackQuery</a> to create buttons that open your bot with user-specific parameters.</li>
|
||||
<li>Added new field <em>switch_inline_query_current_chat</em> in <a href="/bots/api#inlinekeyboardbutton">InlineKeyboardButton</a>.</li>
|
||||
<li>Added <em>caption</em> fields to <a href="/bots/api#sendaudio">sendAudio</a>, <a href="/bots/api#sendvoice">sendVoice</a>, <a href="/bots/api#inlinequeryresultaudio">InlineQueryResultAudio</a>, <a href="/bots/api#inlinequeryresultvoice">InlineQueryResultVoice</a>, <a href="/bots/api#inlinequeryresultcachedaudio">InlineQueryResultCachedAudio</a>, and <a href="/bots/api#inlinequeryresultcachedvoice">InlineQueryResultCachedVoice</a>.</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>New field <em>all_members_are_administrators</em> in the <a href="/bots/api#chat">Chat</a> object.</li>
|
||||
<li>Certain server responses may now contain the new <a href="/bots/api#responseparameters"><em>parameters</em></a> field with expanded info on errors that occurred while processing your requests.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#may-25-2016" id="may-25-2016" name="may-25-2016"><i class="anchor-icon"></i></a>May 25, 2016</h4>
|
||||
<h4><a class="anchor" name="may-25-2016" href="#may-25-2016"><i class="anchor-icon"></i></a>May 25, 2016</h4>
|
||||
<ul>
|
||||
<li><a href="/bots/api#inlinekeyboardmarkup">Inline keyboards</a> may now be used in group chats. Channels coming soon.</li>
|
||||
<li>Check out <a href="https://telegram.me/vote">@vote</a> and <a href="https://telegram.me/like">@like</a> for examples.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#may-22-2016" id="may-22-2016" name="may-22-2016"><i class="anchor-icon"></i></a>May 22, 2016</h4>
|
||||
<h4><a class="anchor" name="may-22-2016" href="#may-22-2016"><i class="anchor-icon"></i></a>May 22, 2016</h4>
|
||||
<ul>
|
||||
<li><strong>Bot API 2.1.</strong> Added more tools for group administrator bots. Your bot can now get a list of administrators and members count in a group, check a user's current status (administrator, creator, left the group, kicked from the group), and leave a group.</li>
|
||||
<li><strong>Bot API 2.1.</strong> Added more tools for group administrator bots. Your bot can now get a list of administrators and members count in a group, check a user's current status (administrator, creator, left the group, kicked from the group), and leave a group.</li>
|
||||
<li>Added new methods: <a href="/bots/api#getchat">getChat</a>, <a href="/bots/api#leavechat">leaveChat</a>, <a href="/bots/api#getchatadministrators">getChatAdministrators</a>, <a href="/bots/api#getchatmember">getChatMember</a>, <a href="/bots/api#getchatmemberscount">getChatMembersCount</a>.</li>
|
||||
<li>Added support for <a href="https://telegram.org/blog/edit">edited messages</a> and <a href="https://telegram.org/blog/edit#new-mentions">new mentions</a> from Telegram v.3.9. New fields: <em>edited_message</em> in <a href="/bots/api#update">Update</a>, <em>edit_date</em> in <a href="/bots/api#message">Message</a>, <em>user</em> in <a href="/bots/api#messageentity">MessageEntity</a>. New value <em>text_mention</em> for the <em>type</em> field in <a href="/bots/api#messageentity">MessageEntity</a>.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#may-12-2016" id="may-12-2016" name="may-12-2016"><i class="anchor-icon"></i></a>May 12, 2016</h4>
|
||||
<h4><a class="anchor" name="may-12-2016" href="#may-12-2016"><i class="anchor-icon"></i></a>May 12, 2016</h4>
|
||||
<ul>
|
||||
<li>Added consistency to what messages bots get in groups and supergroups. <a href="/bots/faq#what-messages-will-my-bot-get">See updated FAQ for details »</a></li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#may-6-2016" id="may-6-2016" name="may-6-2016"><i class="anchor-icon"></i></a>May 6, 2016</h4>
|
||||
<h4><a class="anchor" name="may-6-2016" href="#may-6-2016"><i class="anchor-icon"></i></a>May 6, 2016</h4>
|
||||
<ul>
|
||||
<li>Added the field <em>emoji</em> to the <a href="/bots/api#sticker">Sticker</a> object. Your bot can now know the emoji a sticker corresponds to.</li>
|
||||
<li>Added the field <em>forward_from_chat</em> to the <a href="/bots/api#message">Message</a> object for messages forwarded from channels.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#april-9-2016" id="april-9-2016" name="april-9-2016"><i class="anchor-icon"></i></a>April 9, 2016</h4>
|
||||
<h4><a class="anchor" name="april-9-2016" href="#april-9-2016"><i class="anchor-icon"></i></a>April 9, 2016</h4>
|
||||
<p>Introducing <strong>Bot API 2.0</strong>. Check out <a href="/bots/2-0-intro">this page</a> for a review of this major update.</p>
|
||||
<ul>
|
||||
<li>New <a href="/bots/2-0-intro#new-inline-keyboards"><strong>inline keyboards</strong></a> with <strong>callback</strong> and <strong>URL buttons</strong>. Added new objects <a href="/bots/api#inlinekeyboardmarkup">InlineKeyboardMarkup</a>, <a href="/bots/api#inlinekeyboardbutton">InlineKeyboardButton</a> and <a href="/bots/api#callbackquery">CallbackQuery</a>, added <em>reply_markup</em> fields to all <a href="/bots/api#inlinequeryresult">InlineQueryResult</a> objects. Added field <em>callback_query</em> to the <a href="/bots/api#update">Update</a> object, new method <a href="/bots/api#answercallbackquery">answerCallbackQuery</a>.</li>
|
||||
|
@ -722,71 +702,72 @@ If you're not a developer, you may like <a href="https://telegram.org/blog/games
|
|||
<li>Added fields <em>venue</em>, <em>pinned_message</em> and <em>entities</em> to the <a href="/bots/api#message">Message</a> object. Added new objects <a href="/bots/api#messageentity">MessageEntity</a> and <a href="/bots/api#venue">Venue</a>, new methods <a href="/bots/api#sendvenue">sendVenue</a> and <a href="/bots/api#sendcontact">sendContact</a>.</li>
|
||||
<li>Renamed the fields <em>new_chat_participant</em> and <em>left_chat_participant</em> of the <a href="/bots/api#message">Message</a> object to <em>new_chat_member</em> and <em>left_chat_member</em>.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#february-20-2016" id="february-20-2016" name="february-20-2016"><i class="anchor-icon"></i></a>February 20, 2016</h4>
|
||||
<h4><a class="anchor" name="february-20-2016" href="#february-20-2016"><i class="anchor-icon"></i></a>February 20, 2016</h4>
|
||||
<ul>
|
||||
<li>Added the <em>disable_notification</em> parameter to all methods that send messages or any kind.</li>
|
||||
<li>Removed backward compatibility from the method <a href="/bots/api#sendaudio">sendAudio</a>. Voice messages now must be sent using the method <a href="/bots/api#sendvoice">sendVoice</a>. There is no more need to specify a non-empty title or performer while sending the audio by <em>file_id</em>.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#january-20-2016" id="january-20-2016" name="january-20-2016"><i class="anchor-icon"></i></a>January 20, 2016</h4>
|
||||
<h4><a class="anchor" name="january-20-2016" href="#january-20-2016"><i class="anchor-icon"></i></a>January 20, 2016</h4>
|
||||
<ul>
|
||||
<li>By the way, you can use both HTML-style and markdown-style formatting in your bot's messages to send bold, italic or fixed-width text and inline links. All official Telegram clients support this. See <a href="/bots/api#formatting-options">Formatting options</a> for details.</li>
|
||||
<li>By the way, you can use both HTML-style and markdown-style formatting in your bot's messages to send bold, italic or fixed-width text and inline links. All official Telegram clients support this. See <a href="/bots/api#formatting-options">Formatting options</a> for details.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#january-14-2016" id="january-14-2016" name="january-14-2016"><i class="anchor-icon"></i></a>January 14, 2016</h4>
|
||||
<h4><a class="anchor" name="january-14-2016" href="#january-14-2016"><i class="anchor-icon"></i></a>January 14, 2016</h4>
|
||||
<ul>
|
||||
<li>You can now <a href="/bots/inline#collecting-feedback">collect feedback</a> on which results provided by your inline bot get chosen by the users. Added the <code>setinlinefeedback</code> command for Botfather, new type <a href="/bots/api#choseninlineresult">ChosenInlineResult</a>, new field <em>chosen_inline_result</em> to the <a href="/bots/api#update">Update</a> object.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#january-4-2016" id="january-4-2016" name="january-4-2016"><i class="anchor-icon"></i></a>January 4, 2016</h4>
|
||||
<h4><a class="anchor" name="january-4-2016" href="#january-4-2016"><i class="anchor-icon"></i></a>January 4, 2016</h4>
|
||||
<ul>
|
||||
<li>Added support for <a href="/bots/inline">Inline Mode</a>, a new way for people to contact your bot by typing its username and a query in the text input field in any chat. Enable by sending <code>/setinline</code> to <a href="https://telegram.me/botfather">@BotFather</a>.</li>
|
||||
<li>New optional field <em>inline_query</em> added to the <a href="/bots/api#update">Update</a> object.</li>
|
||||
<li>Added new method <a href="/bots/api#answerinlinequery">answerInlineQuery</a> and new objects <a href="/bots/api#inlinequery">InlineQuery</a>, <a href="/bots/api#inlinequeryresultarticle">InlineQueryResultArticle</a>, <a href="/bots/api#inlinequeryresultphoto">InlineQueryResultPhoto</a>, <a href="/bots/api#inlinequeryresultgif">InlineQueryResultGif</a>, <a href="/bots/api#inlinequeryresultmpeg4gif">InlineQueryResultMpeg4Gif</a> and <a href="/bots/api#inlinequeryresultvideo">InlineQueryResultVideo</a>.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" href="#2015" id="2015" name="2015"><i class="anchor-icon"></i></a>2015</h3>
|
||||
<h4><a class="anchor" href="#november-2015" id="november-2015" name="november-2015"><i class="anchor-icon"></i></a>November, 2015</h4>
|
||||
<h3><a class="anchor" name="2015" href="#2015"><i class="anchor-icon"></i></a>2015</h3>
|
||||
<h4><a class="anchor" name="november-2015" href="#november-2015"><i class="anchor-icon"></i></a>November, 2015</h4>
|
||||
<ul>
|
||||
<li>Added support for <a href="https://telegram.org/blog/supergroups">supergroups</a>. The <em>Type</em> field in the <a href="/bots/api#chat">Chat</a> object can now contain 'supergroup'.</li>
|
||||
<li>Added support for <a href="https://telegram.org/blog/supergroups">supergroups</a>. The <em>Type</em> field in the <a href="/bots/api#chat">Chat</a> object can now contain 'supergroup'.</li>
|
||||
<li>New optional fields added to the <a href="/bots/api#message">Message</a> object: <em>supergroup_chat_created</em>, <em>migrate_to_chat_id</em>, <em>migrate_from_chat_id</em> and <em>channel_chat_created</em>.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#october-8-2015" id="october-8-2015" name="october-8-2015"><i class="anchor-icon"></i></a>October 8, 2015</h4>
|
||||
<h4><a class="anchor" name="october-8-2015" href="#october-8-2015"><i class="anchor-icon"></i></a>October 8, 2015</h4>
|
||||
<ul>
|
||||
<li>Added initial channel support for bots (no Telegram clients support this at the moment, please wait for updates):</li>
|
||||
<li>The <em>Chat</em> field in the <a href="/bots/api#message">Message</a> is now of the new type <a href="/bots/api#chat">Chat</a>.</li>
|
||||
<li>You can now pass a channel username (in the format <code>@channelusername</code>) in the place of <em>chat_id</em> in all methods (and instead of <em>from_chat_id</em> in <a href="/bots/api#forwardmessage">forwardMessage</a>). For this to work, the bot must be an administrator in the channel (and that's exactly what Telegram clients don't support yet — adding bots as administrators coming soon).</li>
|
||||
<li>You can now pass a channel username (in the format <code>@channelusername</code>) in the place of <em>chat_id</em> in all methods (and instead of <em>from_chat_id</em> in <a href="/bots/api#forwardmessage">forwardMessage</a>). For this to work, the bot must be an administrator in the channel (and that's exactly what Telegram clients don't support yet — adding bots as administrators coming soon).</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#september-18-2015" id="september-18-2015" name="september-18-2015"><i class="anchor-icon"></i></a>September 18, 2015</h4>
|
||||
<h4><a class="anchor" name="september-18-2015" href="#september-18-2015"><i class="anchor-icon"></i></a>September 18, 2015</h4>
|
||||
<ul>
|
||||
<li>Bots can now download files and media sent by users.</li>
|
||||
<li>Added <a href="/bots/api#getfile">getFile</a> and <a href="/bots/api#file">File</a>.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#september-7-2015" id="september-7-2015" name="september-7-2015"><i class="anchor-icon"></i></a>September 7, 2015</h4>
|
||||
<h4><a class="anchor" name="september-7-2015" href="#september-7-2015"><i class="anchor-icon"></i></a>September 7, 2015</h4>
|
||||
<ul>
|
||||
<li>You can now <a href="/bots/api#making-requests">pass parameters</a> using <em>application/json</em> (please note that this doesn't work for file uploads: use <em>multipart/form-data</em> to upload files).</li>
|
||||
<li>You can now <a href="/bots/api#making-requests">pass parameters</a> using <em>application/json</em> (please note that this doesn't work for file uploads: use <em>multipart/form-data</em> to upload files).</li>
|
||||
<li>Added very basic <a href="/bots/api#using-markdown">markdown support</a>. New field <em>parse_mode</em> added to <a href="/bots/api#sendmessage">sendMessage</a>. For the moment messages with markdown will be displayed correctly only in Telegram for <strong>Android</strong>. Other official apps will catch up soon.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#august-29-2015" id="august-29-2015" name="august-29-2015"><i class="anchor-icon"></i></a>August 29, 2015</h4>
|
||||
<h4><a class="anchor" name="august-29-2015" href="#august-29-2015"><i class="anchor-icon"></i></a>August 29, 2015</h4>
|
||||
<ul>
|
||||
<li>Added support for self-signed certificates: upload your certificate using the <em>certificate</em> parameter in the <a href="/bots/api#setwebhook">setWebhook</a> method.</li>
|
||||
<li>You can now make <a href="/bots/api#making-requests-when-getting-updates">new requests</a> when responding to webhook updates.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#august-15-2015" id="august-15-2015" name="august-15-2015"><i class="anchor-icon"></i></a>August 15, 2015</h4>
|
||||
<h4><a class="anchor" name="august-15-2015" href="#august-15-2015"><i class="anchor-icon"></i></a>August 15, 2015</h4>
|
||||
<ul>
|
||||
<li>Added new type <strong><a href="/bots/api#voice">Voice</a></strong> and new method <a href="/bots/api#sendvoice"><strong>sendVoice</strong></a> for sending voice messages.</li>
|
||||
<li>Earlier <strong><a href="/bots/api#audio">Audio</a></strong> and <strong><a href="/bots/api#sendaudio">sendAudio</a></strong> should now be used for sending music files. Telegram clients will show such files in the in-app music player. If you were using <a href="/bots/api#sendaudio"><strong>sendAudio</strong></a> for your bot to send voice messages, please use <a href="/bots/api#sendaudio"><strong>sendVoice</strong></a> instead.</li>
|
||||
<li>Added optional fields <em>performer</em>, <em>title</em> to the <a href="/bots/api#audio"><strong>Audio</strong></a> object and <a href="/bots/api#sendaudio"><strong>sendAudio</strong></a> method.</li>
|
||||
<li>Added optional field <em>voice</em> to the <a href="/bots/api#message"><strong>Message</strong></a> object.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#july-2015" id="july-2015" name="july-2015"><i class="anchor-icon"></i></a>July 2015</h4>
|
||||
<h4><a class="anchor" name="july-2015" href="#july-2015"><i class="anchor-icon"></i></a>July 2015</h4>
|
||||
<ul>
|
||||
<li>The <strong>thumb</strong> field is now optional for <a href="/bots/api#video">Video</a>, <a href="/bots/api#sticker">Sticker</a> and <a href="/bots/api#document">Document</a> objects</li>
|
||||
<li>The API now supports both video and photo captions. The <strong>caption</strong> field has been removed from the <a href="/bots/api#video">Video</a> object and added to the <a href="/bots/api#message">Message</a> object instead. </li>
|
||||
<li><strong>caption</strong> and <strong>duration</strong> optional fields have been added to the <a href="/bots/api#sendvideo">sendVideo</a> method.</li>
|
||||
<li>Fixed typo: <strong>user_id</strong> in the Contact object is now correctly labeled as Integer, not String</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#june-24-2015" id="june-24-2015" name="june-24-2015"><i class="anchor-icon"></i></a>June 24, 2015</h4>
|
||||
<h4><a class="anchor" name="june-24-2015" href="#june-24-2015"><i class="anchor-icon"></i></a>June 24, 2015</h4>
|
||||
<p>The bot platform is <a href="https://telegram.org/blog/bot-revolution">officially launched</a>.</p>
|
||||
<blockquote>
|
||||
<p><strong><a href="/bots/api">Back to the Bot API Manual »</a></strong></p>
|
||||
</blockquote></div>
|
||||
</blockquote>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -49,7 +49,7 @@
|
|||
<li><a href="/bots">A General Bot Platform Overview</a></li>
|
||||
<li><a href="/bots/api">Full API Reference for Developers</a></li>
|
||||
</ul>
|
||||
<h3><a class="anchor" href="#what-features-do-bots-have" id="what-features-do-bots-have" name="what-features-do-bots-have"><i class="anchor-icon"></i></a>What features do bots have?</h3>
|
||||
<h3><a class="anchor" name="what-features-do-bots-have" href="#what-features-do-bots-have"><i class="anchor-icon"></i></a>What features do bots have?</h3>
|
||||
<ul>
|
||||
<li><a href="#inputs"><strong>Inputs</strong></a><ul>
|
||||
<li><a href="#inputs">Text</a></li>
|
||||
|
@ -83,21 +83,22 @@
|
|||
<li><a href="#botfather"><strong>BotFather, creating and managing bots</strong></a></li>
|
||||
</ul>
|
||||
<hr>
|
||||
<h3><a class="anchor" href="#inputs" id="inputs" name="inputs"><i class="anchor-icon"></i></a>Inputs</h3>
|
||||
<p>Users can send <strong>messages of all types</strong> to bots, including text, files, locations, stickers, voice messages and even <a href="/bots/api#dice">dice</a> if they're feeling lucky. However, Telegram bots offer many other tools for building flexible interfaces tailored to your specific needs:</p>
|
||||
<h3><a class="anchor" name="inputs" href="#inputs"><i class="anchor-icon"></i></a>Inputs</h3>
|
||||
<p>Users can send <strong>messages of all types</strong> to bots, including text, files, locations, stickers, voice messages and even <a href="/bots/api#dice">dice</a> if they're feeling lucky. However, Telegram bots offer many other tools for building flexible interfaces tailored to your specific needs:</p>
|
||||
<ul>
|
||||
<li><a href="#commands">Commands</a> that are highlighted in messages and can be selected from a list after typing <code>/</code>.</li>
|
||||
<li><a href="#keyboards">Keyboards</a> that replace the user's keyboard with predefined answer options.</li>
|
||||
<li><a href="#keyboards">Keyboards</a> that replace the user's keyboard with predefined answer options.</li>
|
||||
<li><a href="#inline-keyboards">Buttons</a> that are shown next to messages from the bot.</li>
|
||||
</ul>
|
||||
<p>For even more flexibility, <a href="#web-apps">Web Apps</a> support 100% custom interfaces with JavaScript. </p>
|
||||
<div>
|
||||
<a href="/file/464001858/11318/ahAJjwERIX8.164875/ce1372cbf73e3ea94e" target="_blank"><img src="/file/464001858/11318/ahAJjwERIX8.164875/ce1372cbf73e3ea94e" title="Inputs" class="dev_page_image" width="70%"></a>
|
||||
<a href="/file/464001858/11318/ahAJjwERIX8.164875/ce1372cbf73e3ea94e" target="_blank"><img src="/file/464001858/11318/ahAJjwERIX8.164875/ce1372cbf73e3ea94e" title="Inputs" class="dev_page_image" width=70% /></a>
|
||||
</div>
|
||||
|
||||
<blockquote>
|
||||
<p><strong>Note:</strong> Telegram bots can support <a href="#language-support">multiple languages</a> that adapt to the users' language settings in the app.</p>
|
||||
<p><strong>Note:</strong> Telegram bots can support <a href="#language-support">multiple languages</a> that adapt to the users' language settings in the app.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" href="#commands" id="commands" name="commands"><i class="anchor-icon"></i></a>Commands</h4>
|
||||
<h4><a class="anchor" name="commands" href="#commands"><i class="anchor-icon"></i></a>Commands</h4>
|
||||
<p>A command is a simple <code>/keyword</code> that tells the bot what to do. Telegram apps will:</p>
|
||||
<ul>
|
||||
<li><strong>Highlight</strong> commands in messages. When the user taps a highlighted command, that command is immediately sent again.</li>
|
||||
|
@ -112,58 +113,61 @@
|
|||
<li>/newlocation </li>
|
||||
<li>/newrule </li>
|
||||
</ul>
|
||||
<p>Commands should be <strong>as specific as possible</strong> – for example <code>/newlocation</code> or <code>/newrule</code> <strong>is better</strong> than a <code>/new</code> command that then requires an additional parameter from the user like "<em>location</em>" or "<em>rule</em>".</p>
|
||||
<p>Commands should be <strong>as specific as possible</strong> – for example <code>/newlocation</code> or <code>/newrule</code> <strong>is better</strong> than a <code>/new</code> command that then requires an additional parameter from the user like "<em>location</em>“ or ”<em>rule</em>".</p>
|
||||
<div>
|
||||
<a href="/file/464001775/10227/HCr0XgSUHrg.119089/c17ff5d34fe528361e" target="_blank"><img src="/file/464001775/10227/HCr0XgSUHrg.119089/c17ff5d34fe528361e" title="Commands" class="dev_page_image" width="44%"></a>
|
||||
<a href="/file/464001775/10227/HCr0XgSUHrg.119089/c17ff5d34fe528361e" target="_blank"><img src="/file/464001775/10227/HCr0XgSUHrg.119089/c17ff5d34fe528361e" title="Commands" class="dev_page_image"
|
||||
width=44% /></a>
|
||||
</div>
|
||||
|
||||
<blockquote>
|
||||
<p>We require <strong>all developers</strong> to support several <a href="#global-commands">Global Commands</a> to make sure Telegram bots offer a consistent and user-friendly experience.</p>
|
||||
</blockquote>
|
||||
<h5><a class="anchor" href="#command-scopes" id="command-scopes" name="command-scopes"><i class="anchor-icon"></i></a>Command Scopes</h5>
|
||||
<p>Your bot is able to <strong>show different commands</strong> to different users and groups – you can control this using <a href="/bots/api#botcommandscope">scopes</a>. For example, your bot could show additional commands to group admins or translate the list based on the user’s <a href="/bots/api#user">language_code</a>.</p>
|
||||
<h5><a class="anchor" name="command-scopes" href="#command-scopes"><i class="anchor-icon"></i></a>Command Scopes</h5>
|
||||
<p>Your bot is able to <strong>show different commands</strong> to different users and groups – you can control this using <a href="/bots/api#botcommandscope">scopes</a>. For example, your bot could show additional commands to group admins or translate the list based on the user’s <a href="/bots/api#user">language_code</a>.</p>
|
||||
<blockquote>
|
||||
<p>Keep in mind that Bot API <a href="/bots/api#update">updates</a> <strong>will not contain any information</strong> about the scope of a command sent by the user – in fact, they may contain commands that don’t exist at all in your bot. Your backend should <strong>always</strong> verify that received commands are valid and that the user was authorized to use them regardless of scope.</p>
|
||||
</blockquote>
|
||||
<blockquote>
|
||||
<p>Bots with privacy mode enabled will only receive commands in groups under special conditions, <a href="#privacy-mode">see here</a>.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" href="#keyboards" id="keyboards" name="keyboards"><i class="anchor-icon"></i></a>Keyboards</h4>
|
||||
<h4><a class="anchor" name="keyboards" href="#keyboards"><i class="anchor-icon"></i></a>Keyboards</h4>
|
||||
<p>Bots are able to interpret free text input from users, but offering <strong>specific suggestions</strong> is often more intuitive – this is where <strong>custom keyboards</strong> can be extremely useful.</p>
|
||||
<p>Whenever your bot sends a message, it can <strong>display a special keyboard</strong> with predefined reply options (see <a href="/bots/api#replykeyboardmarkup">ReplyKeyboardMarkup</a>). Telegram apps that receive the message will display your keyboard to the user. Using any of the buttons will immediately send the respective text. This way you can drastically <strong>simplify</strong> and <strong>streamline</strong> user interaction with your bot.</p>
|
||||
<div>
|
||||
<a href="/file/464001950/1191a/2RwpmgU-swU.123554/b50478c124d5914c23" target="_blank"><img src="/file/464001950/1191a/2RwpmgU-swU.123554/b50478c124d5914c23" title="Keyboards" class="dev_page_image" width="44%"></a>
|
||||
<a href="/file/464001950/1191a/2RwpmgU-swU.123554/b50478c124d5914c23" target="_blank"><img src="/file/464001950/1191a/2RwpmgU-swU.123554/b50478c124d5914c23" title="Keyboards" class="dev_page_image" width=44% /></a>
|
||||
</div>
|
||||
|
||||
<blockquote>
|
||||
<p>Check out the <a href="/bots/api#replykeyboardmarkup">one_time_keyboard</a> parameter to automatically hide your bot's keyboard as soon as it's been used.</p>
|
||||
<p>Check out the <a href="/bots/api#replykeyboardmarkup">one_time_keyboard</a> parameter to automatically hide your bot's keyboard as soon as it's been used.</p>
|
||||
</blockquote>
|
||||
<p>You can also <strong>customize the text placeholder</strong> in the input field by setting the <code>input_field_placeholder</code> parameter.</p>
|
||||
<h4><a class="anchor" href="#inline-keyboards" id="inline-keyboards" name="inline-keyboards"><i class="anchor-icon"></i></a>Inline Keyboards</h4>
|
||||
<p>There are times when you'd prefer to do things <strong>without sending any messages</strong> to the chat – like when a user is changing settings, toggling options or navigating search results. In such cases, you can use <a href="/bots/api#inlinekeyboardmarkup">Inline Keyboards</a> that are shown directly below their relevant messages.</p>
|
||||
<p>Unlike with custom reply keyboards, pressing buttons on inline keyboards <strong>doesn't send messages to the chat</strong>. Instead, inline keyboards support buttons that can work behind the scenes or open different interfaces: <a href="/bots/api#inlinekeyboardbutton">callback buttons</a>, <a href="/bots/api#inlinekeyboardbutton">URL buttons</a>, <a href="/bots/api#inlinekeyboardbutton">switch-to-inline buttons</a>, <a href="/bots/api#inlinekeyboardbutton">game buttons</a> and <a href="/bots/api#inlinekeyboardbutton">payment buttons</a>. </p>
|
||||
<h4><a class="anchor" name="inline-keyboards" href="#inline-keyboards"><i class="anchor-icon"></i></a>Inline Keyboards</h4>
|
||||
<p>There are times when you'd prefer to do things <strong>without sending any messages</strong> to the chat – like when a user is changing settings, toggling options or navigating search results. In such cases, you can use <a href="/bots/api#inlinekeyboardmarkup">Inline Keyboards</a> that are shown directly below their relevant messages.</p>
|
||||
<p>Unlike with custom reply keyboards, pressing buttons on inline keyboards <strong>doesn't send messages to the chat</strong>. Instead, inline keyboards support buttons that can work behind the scenes or open different interfaces: <a href="/bots/api#inlinekeyboardbutton">callback buttons</a>, <a href="/bots/api#inlinekeyboardbutton">URL buttons</a>, <a href="/bots/api#inlinekeyboardbutton">switch-to-inline buttons</a>, <a href="/bots/api#inlinekeyboardbutton">game buttons</a> and <a href="/bots/api#inlinekeyboardbutton">payment buttons</a>. </p>
|
||||
<div>
|
||||
<a href="/file/464001863/110f3/I47qTXAD9Z4.120010/e0ea04f66357b640ec" target="_blank"><img src="/file/464001863/110f3/I47qTXAD9Z4.120010/e0ea04f66357b640ec" title="Inline Keyboard" class="dev_page_image" width="44%"></a>
|
||||
<a href="/file/464001863/110f3/I47qTXAD9Z4.120010/e0ea04f66357b640ec" target="_blank"><img src="/file/464001863/110f3/I47qTXAD9Z4.120010/e0ea04f66357b640ec" title="Inline Keyboard" class="dev_page_image" width=44% /></a>
|
||||
</div>
|
||||
|
||||
<blockquote>
|
||||
<p>To provide a <strong>better user experience</strong>, consider <a href="/bots/api#editmessagereplymarkup">editing your keyboard</a> when the user toggles a setting button or navigates to a new page – this is both <strong>faster</strong> and <strong>smoother</strong> than sending a whole new message and deleting the previous one.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" href="#menu-button" id="menu-button" name="menu-button"><i class="anchor-icon"></i></a>Menu Button</h4>
|
||||
<p>In all bot chats, a menu button appears near the message field. By default, tapping this button <strong>opens a menu</strong> that can hold some or all of a bot's commands, including a short description for each. Users can then <strong>select a command from the menu</strong> without needing to type it out.</p>
|
||||
<h4><a class="anchor" name="menu-button" href="#menu-button"><i class="anchor-icon"></i></a>Menu Button</h4>
|
||||
<p>In all bot chats, a menu button appears near the message field. By default, tapping this button <strong>opens a menu</strong> that can hold some or all of a bot's commands, including a short description for each. Users can then <strong>select a command from the menu</strong> without needing to type it out.</p>
|
||||
<p>You can set different texts of the menu button and its command descriptions for various <strong>individual users</strong> or <strong>groups of users</strong> – for example, showing translated text based on the user’s language, as explained <a href="#commands">here</a>.</p>
|
||||
<div class="blog_video_player_wrap" style="max-width: 400px; margin: 20px auto 20px;">
|
||||
<video class="blog_video_player tl_blog_vid_autoplay" onclick="videoTogglePlay(this)" autoplay="" loop="" controls="" muted="" poster="/file/464001581/11d85/f42u9c5Wncg.133752/b5a95b7f1221032d7d" style="max-width: 400px;" title="Bot Menu Button" alt="Video: Bot Menu Button">
|
||||
<source src="/file/464001555/10fbd/jvTuV2Ke7WQ.1916669.mp4/a056de323645db409d" type="video/mp4">
|
||||
</source></video>
|
||||
</video>
|
||||
</div>
|
||||
|
||||
<p>The <strong>menu button</strong> can alternatively be used to launch a <a href="#web-apps">Web App</a>.</p>
|
||||
<h4><a class="anchor" href="#global-commands" id="global-commands" name="global-commands"><i class="anchor-icon"></i></a>Global Commands</h4>
|
||||
<h4><a class="anchor" name="global-commands" href="#global-commands"><i class="anchor-icon"></i></a>Global Commands</h4>
|
||||
<p>To make basic interactions more uniform, we ask all developers to support a few <strong>basic commands</strong>. Telegram apps will have interface shortcuts for these commands.</p>
|
||||
<ul>
|
||||
<li>/start - begins the interaction with the user, like sending an introductory message. This command can also be used to pass additional parameters to the bot (see <a href="#deep-linking">Deep Linking</a>).</li>
|
||||
<li>/help - returns a help message, like a short text about what your bot can do and a list of commands.</li>
|
||||
<li>/settings - (if applicable) shows the bot's settings for this user and suggests commands to edit them.</li>
|
||||
<li>/settings - (if applicable) shows the bot's settings for this user and suggests commands to edit them.</li>
|
||||
</ul>
|
||||
<p>Users will see a <strong>Start</strong> button the first time they open a chat with your bot. <strong>Help</strong> and <strong>Settings</strong> links will be available in the menu on the bot's profile page if you add them in <a href="https://t.me/botfather">@BotFather</a>.</p>
|
||||
<h3><a class="anchor" href="#chat-and-user-selection" id="chat-and-user-selection" name="chat-and-user-selection"><i class="anchor-icon"></i></a>Chat and User Selection</h3>
|
||||
<p>Users will see a <strong>Start</strong> button the first time they open a chat with your bot. <strong>Help</strong> and <strong>Settings</strong> links will be available in the menu on the bot's profile page if you add them in <a href="https://t.me/botfather">@BotFather</a>.</p>
|
||||
<h3><a class="anchor" name="chat-and-user-selection" href="#chat-and-user-selection"><i class="anchor-icon"></i></a>Chat and User Selection</h3>
|
||||
<p>Bots can present the user with a <strong>friendly</strong> and <strong>intuitive</strong> interface that lists any number of groups, channels or other users according to a custom set of <strong>criteria</strong>. Tapping on a chat will send its identifier to the bot in a service message and seamlessly close the interface.</p>
|
||||
<p>A group management bot is the <strong>perfect example</strong>: an admin could select a chat the bot should manage, and then select a user it should promote – this would happen without ever typing any text.</p>
|
||||
<p>Here is a <strong>quick start guide</strong> to use this feature:</p>
|
||||
|
@ -171,65 +175,66 @@
|
|||
<li>Pick a set of criteria and store them in a <a href="https://core.telegram.org/bots/api#keyboardbuttonrequestchat">KeyboardButtonRequestChat</a> object (or <a href="https://core.telegram.org/bots/api#keyboardbuttonrequestuser">KeyboardButtonRequestUser</a> for users).</li>
|
||||
<li>Create a <a href="https://core.telegram.org/bots/api#keyboardbutton">KeyboardButton</a> and store the criteria under <code>request_chat</code> or <code>request_user</code> respectively.</li>
|
||||
<li>Send a <a href="https://core.telegram.org/bots/api#replykeyboardmarkup">ReplyKeyboardMarkup</a> that contains the button you just created.</li>
|
||||
<li>When the user selects a chat, you'll receive its identifier in a <code>chat_shared</code> or <code>user_shared</code> service message.</li>
|
||||
<li>When the user selects a chat, you'll receive its identifier in a <code>chat_shared</code> or <code>user_shared</code> service message.</li>
|
||||
</ul>
|
||||
<div class="blog_video_player_wrap" style="max-width: 400px; margin: 20px auto 20px;">
|
||||
<video class="blog_video_player tl_blog_vid_autoplay" onclick="videoTogglePlay(this)" loop="" muted="" poster="/file/464001277/1132d/dAINJNWL9jw.34909/08eaf646c24be49a87" style="max-width: 400px;" title="Select Chats For Bots" alt="Select Chats For Bots" vindex="1" preload="auto">
|
||||
<source src="/file/464001095/11121/M6HpBwtivTE.1913043.mp4/0514a29affa78a6dca" type="video/mp4">
|
||||
</source></video>
|
||||
</video>
|
||||
</div>
|
||||
|
||||
<blockquote>
|
||||
<p>Keep in mind that the bot may not be able to use the identifier it receives if the corresponding chat or user is not already known or accessible by some other means.</p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<h3><a class="anchor" href="#interactions" id="interactions" name="interactions"><i class="anchor-icon"></i></a>Interactions</h3>
|
||||
<h3><a class="anchor" name="interactions" href="#interactions"><i class="anchor-icon"></i></a>Interactions</h3>
|
||||
<p>In addition to sending commands and messages to the chat with the bot, there are several ways of interacting with them without opening any specific chat or group.</p>
|
||||
<ul>
|
||||
<li><a href="#inline-requests"><strong>Inline mode</strong></a> allows sending requests to bots right from the input field – from any chat on Telegram.</li>
|
||||
<li><a href="#deep-linking"><strong>Deep linking</strong></a> allows special links that send certain parameters to the bot when opened.</li>
|
||||
<li><a href="#attachment-menu"><strong>Attachment menu</strong></a> integration makes it possible to use bots from the attachment menu in chats.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#inline-requests" id="inline-requests" name="inline-requests"><i class="anchor-icon"></i></a>Inline Requests</h4>
|
||||
<p>Users can interact with your bot via <strong>inline queries</strong> straight from the message field <strong>in any chat</strong>. All they need to do is start a message with your bot's <em>@username</em> and enter a keyword.</p>
|
||||
<h4><a class="anchor" name="inline-requests" href="#inline-requests"><i class="anchor-icon"></i></a>Inline Requests</h4>
|
||||
<p>Users can interact with your bot via <strong>inline queries</strong> straight from the message field <strong>in any chat</strong>. All they need to do is start a message with your bot's <em>@username</em> and enter a keyword.</p>
|
||||
<p>Having received the query, your bot can return some results. As soon as the user selects one, it is sent to the <strong>relevant chat</strong>. This way, people can request and send content from your bot in any of their chats, groups or channels.</p>
|
||||
<p>Remember that inline functionality has to be enabled via <a href="https://t.me/botfather">@BotFather</a>, or your bot will not receive inline <a href="/bots/api#update">Updates</a>.</p>
|
||||
<div>
|
||||
<a href="/file/464001466/10e4a/r4FKyQ7gw5g.134366/f2606a53d683374703" target="_blank"><img src="/file/464001466/10e4a/r4FKyQ7gw5g.134366/f2606a53d683374703" title="Inline Mode" class="dev_page_image" width="51%/"></a>
|
||||
<a href="/file/464001466/10e4a/r4FKyQ7gw5g.134366/f2606a53d683374703" target="_blank"><img src="/file/464001466/10e4a/r4FKyQ7gw5g.134366/f2606a53d683374703" title="Inline Mode" class="dev_page_image" width=51%/></a>
|
||||
</div>
|
||||
|
||||
<blockquote>
|
||||
<p>Examples of inline bots include <a href="https://t.me/gif">@gif</a>, <a href="https://t.me/bing">@bing</a> and <a href="https://t.me/wiki">@wiki</a>.</p>
|
||||
<p>Examples of inline bots include <a href="https://gif.t.me">@gif</a>, <a href="https://bing.t.me">@bing</a> and <a href="https://wiki.t.me">@wiki</a>. <a href="#web-apps">Web App</a> bots can also be used inline – try typing <a href="https://durgerkingbot.t.me">@durgerkingbot</a> in any chat.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" href="#deep-linking" id="deep-linking" name="deep-linking"><i class="anchor-icon"></i></a>Deep Linking</h4>
|
||||
<p>Telegram bots have a deep linking mechanism that allows <strong>additional parameters</strong> to be passed to the bot on startup. It could be a command that launches the bot – or an authentication token to connect the user's Telegram account to their account on another platform.</p>
|
||||
<h4><a class="anchor" name="deep-linking" href="#deep-linking"><i class="anchor-icon"></i></a>Deep Linking</h4>
|
||||
<p>Telegram bots have a deep linking mechanism that allows <strong>additional parameters</strong> to be passed to the bot on startup. It could be a command that launches the bot – or an authentication token to connect the user's Telegram account to their account on another platform.</p>
|
||||
<p>Each bot has a link that <strong>opens a conversation</strong> with it in Telegram – <code>https://t.me/<bot_username></code>. Parameters can be added directly to this link to let your bot work with additional information on the fly, without any user input.</p>
|
||||
<blockquote>
|
||||
<p>A-Z, a-z, 0-9, _ and - are allowed. We recommend using base64url to encode parameters with binary and other types of content. The parameter can be up to 64 characters long.</p>
|
||||
</blockquote>
|
||||
<p><strong>Private Chats</strong>
|
||||
In private chats, you can use the <code>start</code> parameter to automatically pass any value to your bot whenever a user presses the link. For example, you could use:</p>
|
||||
<p><strong>Private Chats</strong><br>In private chats, you can use the <code>start</code> parameter to automatically pass any value to your bot whenever a user presses the link. For example, you could use:</p>
|
||||
<pre><code>https://t.me/your_bot?start=airplane</code></pre>
|
||||
<p>When someone opens a chat with your bot via this link, you will receive:</p>
|
||||
<pre><code>/start airplane</code></pre>
|
||||
<p><strong>Groups</strong>
|
||||
In groups, you can add the parameter <code>startgroup</code> to this link. For example:</p>
|
||||
<p><strong>Groups</strong><br>In groups, you can add the parameter <code>startgroup</code> to this link. For example:</p>
|
||||
<pre><code>https://t.me/your_bot?startgroup=spaceship</code></pre>
|
||||
<p>Following a link with this parameter prompts the user to select a group to add the bot to – the resulting update will contain text in the form:</p>
|
||||
<pre><code>/start@your_bot spaceship</code></pre>
|
||||
<blockquote>
|
||||
<p><a href="#web-apps">Web Apps</a> also support deep linking, for more information check out our <a href="/bots/webapps#adding-bots-to-the-attachment-menu">dedicated guide</a>.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" href="#attachment-menu" id="attachment-menu" name="attachment-menu"><i class="anchor-icon"></i></a>Attachment Menu</h4>
|
||||
<h4><a class="anchor" name="attachment-menu" href="#attachment-menu"><i class="anchor-icon"></i></a>Attachment Menu</h4>
|
||||
<p>Certain bots can be added directly to a user’s <strong>attachment menu</strong> – giving them easy access to the bot in any chat. Currently, this option is restricted to certain <a href="/bots/webapps#launching-web-apps-from-the-attachment-menu">approved bots</a>, but may be expanded later.</p>
|
||||
<div class="blog_video_player_wrap" style="max-width: 400px; margin: 20px auto 20px;">
|
||||
<video class="blog_video_player tl_blog_vid_autoplay" onclick="videoTogglePlay(this)" autoplay="" loop="" controls="" muted="" poster="/file/464001491/11651/uwMWNdO29NE.215169/1b37285bbd8fc81244" style="max-width: 400px;" title="Attachment Menu" alt="Video: Bot Attachment Menu">
|
||||
<source src="/file/464001177/11b03/ruSbBLQiLJ8.928268.mp4/d9ad95048d23f3cc3f" type="video/mp4">
|
||||
</source></video>
|
||||
</video>
|
||||
</div>
|
||||
|
||||
<blockquote>
|
||||
<p>Try adding <a href="https://t.me/durgerkingbot?startattach">@DurgerKingBot</a> to your attachment menu.</p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<h3><a class="anchor" href="#integration" id="integration" name="integration"><i class="anchor-icon"></i></a>Integration</h3>
|
||||
<h3><a class="anchor" name="integration" href="#integration"><i class="anchor-icon"></i></a>Integration</h3>
|
||||
<p>There are various ways of futher integrating bots with Telegram and other services.</p>
|
||||
<ul>
|
||||
<li>Use <a href="#web-apps">Web Apps</a> to replace any website.</li>
|
||||
|
@ -238,7 +243,7 @@ In groups, you can add the parameter <code>startgroup</code> to this link. For e
|
|||
<li>Create gaming bots by integrating <a href="#html5-games">HTML5 Games</a>.</li>
|
||||
<li>Help users create and manage <a href="#stickers">Telegram Stickers</a>.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" href="#web-apps" id="web-apps" name="web-apps"><i class="anchor-icon"></i></a>Web Apps</h3>
|
||||
<h3><a class="anchor" name="web-apps" href="#web-apps"><i class="anchor-icon"></i></a>Web Apps</h3>
|
||||
<p>Bots can easily process <strong>complex inputs</strong> of any kind and <strong>dynamic interaction flows</strong> via <a href="webapps">Web Apps</a>. With this unique feature, you can develop any number of flexible, streamlined interfaces in <strong>JavaScript</strong>.</p>
|
||||
<blockquote>
|
||||
<p>Web Apps are covered in detail in our <a href="webapps">dedicated guide</a> – you should read it carefully to learn the wide variety of features they can offer.</p>
|
||||
|
@ -246,14 +251,15 @@ In groups, you can add the parameter <code>startgroup</code> to this link. For e
|
|||
<div class="blog_video_player_wrap" style="max-width: 400px; margin: 20px auto 20px;">
|
||||
<video class="blog_video_player tl_blog_vid_autoplay" onclick="videoTogglePlay(this)" autoplay="" loop="" controls="" muted="" poster="/file/464001434/100bf/eWprjdgzEbE.100386/644bbea83084f44c8f" style="max-width: 400px;" title="Attachment Menu" alt="Video: Bot Attachment Menu">
|
||||
<source src="/file/464001679/11aa9/KQx_BlPVXRo.4922145.mp4/c65433c8ac11a347a8" type="video/mp4">
|
||||
</source></video>
|
||||
</video>
|
||||
</div>
|
||||
<p>If you develop a <strong>Web App</strong>, be sure to follow our <a href="webapps#design-guidelines">design guidelines</a> – you'll want your custom interface to <strong>seamlessly integrate</strong> into the app to provide users the best possible experience.</p>
|
||||
<h3><a class="anchor" href="#payments" id="payments" name="payments"><i class="anchor-icon"></i></a>Payments</h3>
|
||||
<p>Telegram bots can accept payments with a sleek, streamlined interface that collects all necessary data from the user. Telegram <strong>doesn't collect</strong> any payment data – like the user's credit card information – and sends it directly to one of the supported <a href="payments#supported-payment-providers">payment providers</a>.</p>
|
||||
|
||||
<p>If you develop a <strong>Web App</strong>, be sure to follow our <a href="webapps#design-guidelines">design guidelines</a> – you'll want your custom interface to <strong>seamlessly integrate</strong> into the app to provide users the best possible experience.</p>
|
||||
<h3><a class="anchor" name="payments" href="#payments"><i class="anchor-icon"></i></a>Payments</h3>
|
||||
<p>Telegram bots can accept payments with a sleek, streamlined interface that collects all necessary data from the user. Telegram <strong>doesn't collect</strong> any payment data – like the user's credit card information – and sends it directly to one of the supported <a href="payments#supported-payment-providers">payment providers</a>.</p>
|
||||
<p>Here is a <strong>quick start guide</strong> to implement payments:</p>
|
||||
<ul>
|
||||
<li>Pick a <a href="payments#supported-payment-providers">provider</a> and obtain the <a href="payments#getting-a-token">proper token</a> as well as a <strong>test token</strong> from the "<strong>Stripe TEST MODE</strong>" provider.</li>
|
||||
<li>Pick a <a href="payments#supported-payment-providers">provider</a> and obtain the <a href="payments#getting-a-token">proper token</a> as well as a <strong>test token</strong> from the "<strong>Stripe TEST MODE</strong>" provider.</li>
|
||||
<li>Implement payments via the <a href="/bots/api#payments">appropriate API methods</a>.</li>
|
||||
<li>Test your implementation by using your <strong>test token</strong> along with a <a href="https://stripe.com/docs/testing#cards">test credit card</a>.</li>
|
||||
</ul>
|
||||
|
@ -266,37 +272,38 @@ In groups, you can add the parameter <code>startgroup</code> to this link. For e
|
|||
</ul>
|
||||
<p>A full and exhaustive guide, including live checklist, parameters and in-depth method descriptions is available <a href="/bots/payments">here</a>. We <strong>strongly recommend</strong> that you read the full guide before going live.</p>
|
||||
<div>
|
||||
<a href="/file/464001393/101fc/SB_bFCLR0tg.130549/7ecf91aaa44737e8cb" target="_blank"><img src="/file/464001393/101fc/SB_bFCLR0tg.130549/7ecf91aaa44737e8cb" title="Payments" class="dev_page_image" width="50%"></a>
|
||||
<a href="/file/464001393/101fc/SB_bFCLR0tg.130549/7ecf91aaa44737e8cb" target="_blank"><img src="/file/464001393/101fc/SB_bFCLR0tg.130549/7ecf91aaa44737e8cb" title="Payments" class="dev_page_image" width=50% /></a>
|
||||
</div>
|
||||
|
||||
<blockquote>
|
||||
<p>Telegram does not directly process the payments, does not store data about orders and does not collect any fees. Invoices are forwarded directly to the payment provider.
|
||||
For this reason, disputes must be solved between the user, the bot developer and the payment provider. You can read more about this in the <a href="https://telegram.org/privacy#7-third-party-payment-services">Privacy Policy</a>.</p>
|
||||
<p>Telegram does not directly process the payments, does not store data about orders and does not collect any fees. Invoices are forwarded directly to the payment provider.<br>For this reason, disputes must be solved between the user, the bot developer and the payment provider. You can read more about this in the <a href="https://telegram.org/privacy#7-third-party-payment-services">Privacy Policy</a>.</p>
|
||||
</blockquote>
|
||||
<h3><a class="anchor" href="#web-login" id="web-login" name="web-login"><i class="anchor-icon"></i></a>Web Login</h3>
|
||||
<h3><a class="anchor" name="web-login" href="#web-login"><i class="anchor-icon"></i></a>Web Login</h3>
|
||||
<p>Telegram offers a <strong>flexible</strong>, <strong>lightweight</strong> and <strong>free</strong> framework to authenticate users on any website and app. This can be used to bridge your platform with Telegram, providing a smooth experience to your users. You can also freely rely on this framework to implement a <strong>fast</strong> and <strong>signup-free</strong> login on your site, regardless of its connection to Telegram.</p>
|
||||
<h4><a class="anchor" href="#widgets" id="widgets" name="widgets"><i class="anchor-icon"></i></a>Widgets</h4>
|
||||
<h4><a class="anchor" name="widgets" href="#widgets"><i class="anchor-icon"></i></a>Widgets</h4>
|
||||
<p>The Telegram login widget is a <strong>simple and secure way to authorize users</strong> on your website.</p>
|
||||
<ol>
|
||||
<li>Choose a bot – ideally its name and profile pic <strong>should match</strong> the website title and logo.</li>
|
||||
<li>Use the <code>/setdomain</code> command in <a href="https://t.me/botfather">@BotFather</a> to pair the bot with your website domain. </li>
|
||||
<li>Configure your widget using <a href="/widgets/login#widget-configuration">our dedicated tool</a> and embed it on your website.</li>
|
||||
</ol>
|
||||
<h4><a class="anchor" href="#inline-login" id="inline-login" name="inline-login"><i class="anchor-icon"></i></a>Inline Login</h4>
|
||||
<p>When users open your website via an <strong>inline button</strong>, you can use the <a href="/bots/api#loginurl">login_url</a> parameter as an alternative to login widgets. This way, you'll be able to <a href="https://telegram.org/blog/privacy-discussions-web-bots#meet-seamless-web-bots">seamlessly authorize</a> them on your website or app before the page even loads.</p>
|
||||
<h4><a class="anchor" name="inline-login" href="#inline-login"><i class="anchor-icon"></i></a>Inline Login</h4>
|
||||
<p>When users open your website via an <strong>inline button</strong>, you can use the <a href="/bots/api#loginurl">login_url</a> parameter as an alternative to login widgets. This way, you'll be able to <a href="https://telegram.org/blog/privacy-discussions-web-bots#meet-seamless-web-bots">seamlessly authorize</a> them on your website or app before the page even loads.</p>
|
||||
<div>
|
||||
<a href="/file/464001287/105ea/23bO4ntH4tc.43741/c9624e36c3462b6540" target="_blank"><img src="/file/464001287/105ea/23bO4ntH4tc.43741/c9624e36c3462b6540" width="50%" title="Login Widget" class="dev_page_image"></a>
|
||||
<a href="/file/464001287/105ea/23bO4ntH4tc.43741/c9624e36c3462b6540" target="_blank"><img src="/file/464001287/105ea/23bO4ntH4tc.43741/c9624e36c3462b6540" width=50% title="Login Widget" class="dev_page_image" /></a>
|
||||
</div>
|
||||
|
||||
<blockquote>
|
||||
<p>Make sure to review our <a href="/widgets/login#checking-authorization">guide</a> on authenticating the received data as well as our <a href="https://gist.github.com/anonymous/6516521b1fb3b464534fbc30ea3573c2">sample code</a>.</p>
|
||||
</blockquote>
|
||||
<h3><a class="anchor" href="#html5-games" id="html5-games" name="html5-games"><i class="anchor-icon"></i></a>HTML5 Games</h3>
|
||||
<h3><a class="anchor" name="html5-games" href="#html5-games"><i class="anchor-icon"></i></a>HTML5 Games</h3>
|
||||
<p>Bots can serve as <strong>standalone gaming platforms</strong> – with our <a href="/bots/api#games">HTML5 Gaming API</a> you can develop multiplayer or single-player games and let your users have fun comparing <strong>ranks</strong>, <strong>scores</strong> and much more.</p>
|
||||
<p>To get started, follow these simple steps:</p>
|
||||
<ul>
|
||||
<li>Send the <code>/newgame</code> command to <a href="https://t.me/botfather">@BotFather</a></li>
|
||||
<li>Provide a <strong>description text</strong>, an <strong>image</strong> or an <strong>optional gif</strong> to showcase its gameplay</li>
|
||||
<li>Send the game to users via the <a href="/bots/api#sendgame">sendGame</a> method or via an <a href="/bots/api#inlinequeryresultgame">inline query</a></li>
|
||||
<li>When someone wants to play, you'll receive the appropriate <code>game_short_name</code> in a <a href="/bots/api#callbackquery">CallbackQuery</a></li>
|
||||
<li>When someone wants to play, you'll receive the appropriate <code>game_short_name</code> in a <a href="/bots/api#callbackquery">CallbackQuery</a></li>
|
||||
<li>To launch the game, provide the <strong>HTML5 Game URL</strong> as the <code>url</code> param of <a href="/bots/api#answercallbackquery">answerCallbackQuery</a></li>
|
||||
</ul>
|
||||
<p>Then, to handle <strong>highscores</strong>:</p>
|
||||
|
@ -310,45 +317,49 @@ For this reason, disputes must be solved between the user, the bot developer and
|
|||
<li><a href="/bots/api#games">HTML5 Games Bot API Docs</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<a href="/file/464001558/11b92/y_Fu9QQWtj0.141959/dc9db48f66800bf271" target="_blank"><img src="/file/464001558/11b92/y_Fu9QQWtj0.141959/dc9db48f66800bf271" title="Games" width="50%" class="dev_page_image"></a>
|
||||
<a href="/file/464001558/11b92/y_Fu9QQWtj0.141959/dc9db48f66800bf271" target="_blank"><img src="/file/464001558/11b92/y_Fu9QQWtj0.141959/dc9db48f66800bf271" title="Games" width=50% class="dev_page_image" /></a>
|
||||
</div>
|
||||
|
||||
<blockquote>
|
||||
<p>Check out <a href="https://t.me/gamebot">@GameBot</a> and <a href="https://t.me/gamee">@gamee</a> for examples of what you can do using our Gaming Platform.</p>
|
||||
</blockquote>
|
||||
<h3><a class="anchor" href="#stickers" id="stickers" name="stickers"><i class="anchor-icon"></i></a>Stickers</h3>
|
||||
<p><a href="/stickers">Stickers</a> are a distinctive Telegram feature used by millions of users to share artwork every day. Stickers take many forms – ranging from <strong>basic images</strong> to smooth <strong>vector animations</strong> and high-detail <strong>.WEBM videos</strong>.</p>
|
||||
<p>All these formats are supported by our <a href="/bots/api#stickers">Bot API</a>, which allows bots to <strong>create</strong>, <strong>edit</strong>, <strong>delete</strong> and <strong>share</strong> new sticker packs on the fly. Telegram's <a href="/import-stickers">Import API</a> lets users <strong>migrate packs</strong> from other platforms and sticker apps.</p>
|
||||
<p>To create a <strong>new sticker pack</strong>, follow these simple steps:</p>
|
||||
<h3><a class="anchor" name="stickers-and-custom-emoji" href="#stickers-and-custom-emoji"><i class="anchor-icon"></i></a>Stickers and Custom Emoji</h3>
|
||||
<p><a href="https://core.telegram.org/stickers">Stickers</a> and <a href="https://telegram.org/blog/custom-emoji">Custom Emoji</a> are a distinctive Telegram feature used by millions of users to share artwork every day. Stickers and custom emoji take many forms – ranging from <strong>basic images</strong> to smooth <strong>vector animations</strong> and high-detail <strong>.WEBM videos</strong>.</p>
|
||||
<p>All these formats are supported by our <a href="api#stickers">Bot API</a>, which allows bots to <strong>create</strong>, <strong>edit</strong>, <strong>delete</strong> and <strong>share</strong> new artwork packs on the fly. Telegram's <a href="https://core.telegram.org/import-stickers">Import API</a> lets users <strong>migrate packs</strong> from other platforms and sticker apps.</p>
|
||||
<p><strong>Creating a new pack</strong><br>To create a <strong>new pack</strong>, simply:</p>
|
||||
<ul>
|
||||
<li><strong>Upload</strong> a new sticker file via <a href="/bots/api#uploadstickerfile">uploadStickerFile</a>. Repeat for all the stickers in the set. You will use the returned <a href="/bots/api#file">files</a> in the next step, so keep them around.</li>
|
||||
<li><strong>Create</strong> a new sticker pack via <a href="/bots/api#createnewstickerset">createStickerSet</a>. Attach the first sticker as a <a href="/bots/api#file">file</a> you collected in <strong>step 1</strong> and remember to only specify <strong>one</strong> of the three avaiable fields – <code>png_sticker</code>, <code>tgs_sticker</code> and <code>webm_sticker</code> – depending on which sticker format you uploaded.</li>
|
||||
<li><strong>Complete</strong> the pack by adding each remaining sticker in sequence via <a href="/bots/api#addstickertoset">addStickerToSet</a>.</li>
|
||||
<li><strong>Prepare</strong> your artwork following our <a href="https://core.telegram.org/stickers">technical requirements</a>.</li>
|
||||
<li><strong>Create</strong> a new sticker pack via <a href="api#createnewstickerset">createStickerSet</a>. Set <code>sticker_type</code> to <em>regular</em> to create a sticker pack or to <em>custom emoji</em> to create a pack of custom emoji. Attach the <a href="api#file">files</a> you wish to include in the pack as an array of <a href="https://core.telegram.org/bots#inputsticker">InputSticker</a></li>
|
||||
<li>You can use <a href="api#addstickertoset">addStickerToSet</a> to add stickers or emoji later on.</li>
|
||||
</ul>
|
||||
<p><strong>Additional features</strong><br>Regular stickers and custom emoji support <strong>keywords</strong> that users can type to quickly find the respective artwork – this can be useful when a sticker doesn't have obvious ties to a specific emoji. You can use the <code>keywords</code> parameter in <a href="https://core.telegram.org/bots#inputsticker">InputSticker</a> to specify them.</p>
|
||||
<p>Custom emoji additionally support <strong>adaptive colors</strong> – they will always match the current context (e.g., white on photos, accent color when used as status, etc.); to enable this feature, use the <code>needs_repainting</code> parameter in <a href="api#createnewstickerset">createStickerSet</a>.</p>
|
||||
<p>Once you're done creating and sharing your artwork, don't forget to check out our <a href="api#stickers">remaining sticker methods</a> to find out how to <a href="api#setstickersetthumb">edit</a>, <a href="api#deletestickerfromset">delete</a> and even <a href="api#setstickerpositioninset">reorder</a> your pack. </p>
|
||||
<blockquote>
|
||||
<p>Once you're done, don't forget to check out our <a href="/bots/api#stickers">remaining sticker methods</a> to find out how to <a href="/bots/api#setstickersetthumb">edit</a>, <a href="/bots/api#deletestickerfromset">delete</a> and even <a href="/bots/api#setstickerpositioninset">reorder</a> your pack.
|
||||
Note that these methods will only work on packs <strong>created by the bot that is calling them</strong>.</p>
|
||||
<p>Note that these methods will only work on packs <strong>created by the bot that is calling them</strong>.</p>
|
||||
</blockquote>
|
||||
<h3><a class="anchor" href="#language-support" id="language-support" name="language-support"><i class="anchor-icon"></i></a>Language Support</h3>
|
||||
<h3><a class="anchor" name="language-support" href="#language-support"><i class="anchor-icon"></i></a>Language Support</h3>
|
||||
<p>Bots can tailor their interfaces to <strong>support multiple languages</strong> – updating inputs and information on the fly. A user’s <a href="/bots/api#user">language_code</a> is included in every relevant <a href="/bots/api#update">update</a> as an <a href="https://en.wikipedia.org/wiki/IETF_language_tag">IETF language tag</a>, allowing bots to adapt accordingly. </p>
|
||||
<p>We recommend that you follow our guidelines to provide <strong>the best user experience</strong>.</p>
|
||||
<ul>
|
||||
<li>Your interfaces, texts and <a href="/bots/api#answerinlinequery">inline results</a> should adapt seamlessly to the <em>language_code</em>, without user intervention.</li>
|
||||
<li>Connected <a href="/bots/webapps">WebApps</a> will receive the user's <em>language_code</em> – your HTML page should account for it.</li>
|
||||
<li><a href="/bots/games">HTML5 Games</a> can obtain language information if you specify it as a <a href="/bots/games#using-url-parameters">URL parameter</a>. You can generate this parameter from the <em>language_code</em> field in the <a href="/bots/api#user">User</a> object served with the initial game <a href="/bots/api#callbackquery">CallbackQuery</a>.</li>
|
||||
<li>Connected <a href="/bots/webapps">WebApps</a> will receive the user's <em>language_code</em> – your HTML page should account for it.</li>
|
||||
<li><a href="/bots/html5-games">HTML5 Games</a> can obtain language information if you specify it as a <a href="/bots/games#using-url-parameters">URL parameter</a>. You can generate this parameter from the <em>language_code</em> field in the <a href="/bots/api#user">User</a> object served with the initial game <a href="/bots/api#callbackquery">CallbackQuery</a>.</li>
|
||||
<li>The bot's <strong>Name</strong>, <strong>Description</strong> and <strong>About text</strong> can be natively localized with the respective <a href="https://core.telegram.org/bots/api#setmydescription">methods</a>.</li>
|
||||
<li>Command lists can also be specified for individual languages – more on this <a href="#commands">here</a>.</li>
|
||||
</ul>
|
||||
<div class="blog_video_player_wrap" style="max-width: 400px; margin: 20px auto 20px;">
|
||||
<video class="blog_video_player tl_blog_vid_autoplay" onclick="videoTogglePlay(this)" autoplay="" loop="" controls="" muted="" poster="/file/464001822/10cd0/EvtvjnhA-kA.132475/e285952b505535d85a" style="max-width: 400px;" title="Language Support" alt="Video: Language Support">
|
||||
<source src="/file/464001083/105cd/NF4ViAHfTJc.3601652.mp4/0fd787953c11a6371d" type="video/mp4">
|
||||
</source></video>
|
||||
</video>
|
||||
</div>
|
||||
|
||||
<blockquote>
|
||||
<p>The <em>language_code</em> is an <strong>optional field</strong> – it could be empty.
|
||||
If you target the general public, your code should always fall back to either the last recorded language tag or English (in this order) when the field is missing for a specific user. </p>
|
||||
<p>The <em>language_code</em> is an <strong>optional field</strong> – it could be empty.<br>If you target the general public, your code should always fall back to either the last recorded language tag or English (in this order) when the field is missing for a specific user. </p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<h3><a class="anchor" href="#bot-management" id="bot-management" name="bot-management"><i class="anchor-icon"></i></a>Bot Management</h3>
|
||||
<h4><a class="anchor" href="#privacy-mode" id="privacy-mode" name="privacy-mode"><i class="anchor-icon"></i></a>Privacy Mode</h4>
|
||||
<h3><a class="anchor" name="bot-management" href="#bot-management"><i class="anchor-icon"></i></a>Bot Management</h3>
|
||||
<h4><a class="anchor" name="privacy-mode" href="#privacy-mode"><i class="anchor-icon"></i></a>Privacy Mode</h4>
|
||||
<p>Bots are frequently added to groups to perform basic tasks or assist moderators – like automatically posting company announcements or even celebrating birthdays. By default, <strong>all bots</strong> added to groups run in Privacy Mode and only see relevant messages and commands:</p>
|
||||
<ul>
|
||||
<li>Commands explicitly meant for them (e.g., <code>/command@this_bot</code>).</li>
|
||||
|
@ -362,20 +373,21 @@ If you target the general public, your code should always fall back to either th
|
|||
<li>All messages from private chats.</li>
|
||||
<li>All messages from channels where they are a member.</li>
|
||||
</ul>
|
||||
<p>Privacy mode is <strong>enabled by default</strong> for all bots, except bots that were added to a group as admins (bot admins always receive <strong>all messages</strong>). It can be disabled so that the bot receives all messages like an ordinary user (the bot will need to be re-added to the group for this change to take effect). We only recommend doing this in cases where it is <strong>absolutely necessary</strong> for your bot to work. In most cases, using the force reply option for the bot's messages should be more than enough.</p>
|
||||
<p>Privacy mode is <strong>enabled by default</strong> for all bots, except bots that were added to a group as admins (bot admins always receive <strong>all messages</strong>). It can be disabled so that the bot receives all messages like an ordinary user (the bot will need to be re-added to the group for this change to take effect). We only recommend doing this in cases where it is <strong>absolutely necessary</strong> for your bot to work. In most cases, using the force reply option for the bot's messages should be more than enough.</p>
|
||||
<div>
|
||||
<a href="/file/464001338/107af/JdbERa0BATg.62371/28977e9a96aed3860a" target="_blank"><img src="/file/464001338/107af/JdbERa0BATg.62371/28977e9a96aed3860a" title="Privacy Mode" class="dev_page_image" width="50%/"></a>
|
||||
<a href="/file/464001338/107af/JdbERa0BATg.62371/28977e9a96aed3860a" target="_blank"><img src="/file/464001338/107af/JdbERa0BATg.62371/28977e9a96aed3860a" title="Privacy Mode" class="dev_page_image" width=50%/></a>
|
||||
</div>
|
||||
|
||||
<blockquote>
|
||||
<p>This mode not only increases user privacy, but also makes the bot more efficient by reducing the number of inputs it needs to process. Users can always see a bot’s current privacy setting in the list of group members.</p>
|
||||
</blockquote>
|
||||
<h3><a class="anchor" href="#testing-your-bot" id="testing-your-bot" name="testing-your-bot"><i class="anchor-icon"></i></a>Testing your bot</h3>
|
||||
<h3><a class="anchor" name="testing-your-bot" href="#testing-your-bot"><i class="anchor-icon"></i></a>Testing your bot</h3>
|
||||
<p>You can quickly test your bot <strong>without interfering</strong> with its users by simply running another instance of your code on a different bot account. To do so, create a <em>new bot</em> via <a href="https://t.me/botfather">@BotFather</a>, obtain its token and use it in the testing instance of your code.</p>
|
||||
<p>All further testing and debugging can happen privately on the new bot, without affecting the original instance.</p>
|
||||
<blockquote>
|
||||
<p>If you need to share file references across bots, note that the <code>file_id</code> field is tied to a single bot id, so your test instance cannot use a shared <code>file_id</code> database to quickly send media – files must be individually reuploaded.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" href="#dedicated-test-environment" id="dedicated-test-environment" name="dedicated-test-environment"><i class="anchor-icon"></i></a>Dedicated test environment</h4>
|
||||
<h4><a class="anchor" name="dedicated-test-environment" href="#dedicated-test-environment"><i class="anchor-icon"></i></a>Dedicated test environment</h4>
|
||||
<p>Telegram also offers a dedicated <strong>test environment</strong> suitable for more advanced testing. Bots and users in this environment generally have more flexible restrictions – for example:</p>
|
||||
<ul>
|
||||
<li>When working with the test environment, you may use HTTP links without TLS to test your <a href="https://core.telegram.org/bots/features#web-apps">Web Apps</a> or <a href="https://core.telegram.org/bots/features#web-login">Web Login</a>.</li>
|
||||
|
@ -384,62 +396,55 @@ If you target the general public, your code should always fall back to either th
|
|||
<blockquote>
|
||||
<p><strong>Flood limits</strong> are not raised in the test environment, and may at times be stricter. To minimize how this impacts your bot, you should make sure that it handles errors with retry policies and does not depend on hardcoded limit values.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" href="#creating-a-bot-in-the-test-environment" id="creating-a-bot-in-the-test-environment" name="creating-a-bot-in-the-test-environment"><i class="anchor-icon"></i></a>Creating a bot in the test environment</h4>
|
||||
<h4><a class="anchor" name="creating-a-bot-in-the-test-environment" href="#creating-a-bot-in-the-test-environment"><i class="anchor-icon"></i></a>Creating a bot in the test environment</h4>
|
||||
<p>The test environment is <strong>completely separate</strong> from the main environment, so you will need to create a new user account and a new bot with <a href="https://t.me/botfather">@BotFather</a>.</p>
|
||||
<p>To create an account and log in, use either of the following:</p>
|
||||
<ul>
|
||||
<li><strong>iOS</strong>: tap 10 times on the Settings icon > Accounts > Login to another account > Test.</li>
|
||||
<li><strong>Telegram Desktop</strong>: open ☰ Settings > Shift + Alt + Right click 'Add Account' and select 'Test Server'.</li>
|
||||
<li><strong>macOS</strong>: click the Settings icon 10 times to open the Debug Menu, ⌘ + click 'Add Account' and log in via phone number.</li>
|
||||
<li><strong>Telegram Desktop</strong>: open ☰ Settings > Shift + Alt + Right click 'Add Account' and select 'Test Server'.</li>
|
||||
<li><strong>macOS</strong>: click the Settings icon 10 times to open the Debug Menu, ⌘ + click 'Add Account' and log in via phone number.</li>
|
||||
</ul>
|
||||
<p>After logging in, simply <a href="#creating-a-new-bot">create a new bot</a> following the standard procedure and send your requests to the Test Bot API in this format:</p>
|
||||
<pre><code>https://api.telegram.org/bot<token>/test/METHOD_NAME</code></pre>
|
||||
<blockquote>
|
||||
<p>When working with the test environment, you may use HTTP links without TLS in the <code>url</code> field of both <a href="/bots/api#loginurl">LoginUrl</a> and <a href="/bots/api#webappinfo">WebAppInfo</a>.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" href="#status-alerts" id="status-alerts" name="status-alerts"><i class="anchor-icon"></i></a>Status alerts</h4>
|
||||
<h4><a class="anchor" name="status-alerts" href="#status-alerts"><i class="anchor-icon"></i></a>Status alerts</h4>
|
||||
<p>Millions choose Telegram for its speed. To best benefit users, your bot also <strong>needs to be responsive</strong>. In order to help developers keep their bots in shape, <a href="https://t.me/botfather">@BotFather</a> will send <strong>status alerts</strong> if it sees something is wrong.</p>
|
||||
<p>We check the number of replies and the <em>request/response</em> conversion rate for popular bots (~300 requests per minute, this value may change in the future). If your bot returns an <strong>abnormally low number</strong>, you will receive a notification from <a href="https://t.me/botfather">@BotFather</a>.</p>
|
||||
<h5><a class="anchor" href="#responding-to-alerts" id="responding-to-alerts" name="responding-to-alerts"><i class="anchor-icon"></i></a>Responding to alerts</h5>
|
||||
<h5><a class="anchor" name="responding-to-alerts" href="#responding-to-alerts"><i class="anchor-icon"></i></a>Responding to alerts</h5>
|
||||
<p>By default, <strong>you will only get one alert per bot per hour</strong>. </p>
|
||||
<p>Each alert has the following buttons:</p>
|
||||
<ul>
|
||||
<li><strong>Fixed</strong> - Use this if you found an issue with your bot and fixed it. If you press the fix button, we will resume sending alerts in the regular way so that you can see if your fix worked within 5-10 minutes instead of having to wait for an hour.</li>
|
||||
<li><strong>Support</strong> - Use this to open a chat with <a href="https://t.me/botsupport">@BotSupport</a> if you don't see any issues with your bot or if you think the problem is on our side.</li>
|
||||
<li><strong>Mute for 8h/1w</strong> - Use this if you can't fix your bot at the moment. This will disable all alerts for the bot in question for the specified period of time. <strong>We do not recommend</strong> using this option since your users may migrate to a more stable bot. You can unmute alerts in your bot's settings via <a href="https://t.me/botfather">@BotFather</a>.</li>
|
||||
<li><strong>Support</strong> - Use this to open a chat with <a href="https://t.me/botsupport">@BotSupport</a> if you don't see any issues with your bot or if you think the problem is on our side.</li>
|
||||
<li><strong>Mute for 8h/1w</strong> - Use this if you can't fix your bot at the moment. This will disable all alerts for the bot in question for the specified period of time. <strong>We do not recommend</strong> using this option since your users may migrate to a more stable bot. You can unmute alerts in your bot's settings via <a href="https://t.me/botfather">@BotFather</a>.</li>
|
||||
</ul>
|
||||
<h5><a class="anchor" href="#monitored-issues" id="monitored-issues" name="monitored-issues"><i class="anchor-icon"></i></a>Monitored issues</h5>
|
||||
<h5><a class="anchor" name="monitored-issues" href="#monitored-issues"><i class="anchor-icon"></i></a>Monitored issues</h5>
|
||||
<p>We currently notify you about the following issues:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p><strong>Too few private messages are sent.</strong> Value: <strong>{value}</strong> - Your bot is sending far fewer messages than it did in previous weeks. This is useful for newsletter-style bots that send messages without prompts from users. The larger the value, the more significant the difference.</p>
|
||||
<li><p><strong>Too few private messages are sent.</strong> Value: <strong>{value}</strong> - Your bot is sending far fewer messages than it did in previous weeks. This is useful for newsletter-style bots that send messages without prompts from users. The larger the value, the more significant the difference.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Too few replies to incoming private messages</strong>. Conversion rate: <strong>{value}</strong> - Your bot is not replying to all messages that are being sent to it (the request/response conversion rate for your bot was too low for at least two of the last three 5-minute periods). </p>
|
||||
<li><p><strong>Too few replies to incoming private messages</strong>. Conversion rate: <strong>{value}</strong> - Your bot is not replying to all messages that are being sent to it (the request/response conversion rate for your bot was too low for at least two of the last three 5-minute periods). </p>
|
||||
</li>
|
||||
</ul>
|
||||
<blockquote>
|
||||
<p>To provide a good user experience, please respond to all messages that are sent to your bot. Respond to message updates by calling send… methods (e.g. <a href="/bots/api#sendmessage">sendMessage</a>).</p>
|
||||
</blockquote>
|
||||
<ul>
|
||||
<li>
|
||||
<p><strong>Too few answers to inline queries</strong>. Conversion rate: <strong>{value}</strong> - Your bot is not replying to all inline queries that are being sent to it, calculated in the same way as above. Respond to <code>inline_query</code> updates by calling <a href="/bots/api#answerinlinequery">answerInlineQuery</a>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Too few answers to callback queries</strong>. Conversion rate: <strong>{value}</strong></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Too few answers to callback game queries</strong>. Conversion rate: <strong>{value}</strong> - Your bot is not replying to all callback queries that are being sent to it (with or without games), calculated in the same way as above. Respond to <code>callback_query</code> updates by calling <a href="/bots/api#answercallbackquery">answerCallbackQuery</a>.</p>
|
||||
</li>
|
||||
<li><strong>Too few answers to inline queries</strong>. Conversion rate: <strong>{value}</strong> - Your bot is not replying to all inline queries that are being sent to it, calculated in the same way as above. Respond to <code>inline_query</code> updates by calling <a href="/bots/api#answerinlinequery">answerInlineQuery</a>.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#local-bot-api" id="local-bot-api" name="local-bot-api"><i class="anchor-icon"></i></a>Local Bot API</h4>
|
||||
<p>You can host and work with <strong>your own instance</strong> of our open-source <a href="/bots/api">Bot API</a>.
|
||||
The <strong>source code</strong> is available <a href="https://github.com/tdlib/telegram-bot-api">here</a>, along with a quick <a href="https://github.com/tdlib/telegram-bot-api#installation">installation guide</a>.</p>
|
||||
<ul>
|
||||
<li><strong>Too few answers to callback queries</strong>. Conversion rate: <strong>{value}</strong></li>
|
||||
<li><strong>Too few answers to callback game queries</strong>. Conversion rate: <strong>{value}</strong> - Your bot is not replying to all callback queries that are being sent to it (with or without games), calculated in the same way as above. Respond to <code>callback_query</code> updates by calling <a href="/bots/api#answercallbackquery">answerCallbackQuery</a>.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" name="local-bot-api" href="#local-bot-api"><i class="anchor-icon"></i></a>Local Bot API</h4>
|
||||
<p>You can host and work with <strong>your own instance</strong> of our open-source <a href="/bots/api">Bot API</a>.<br>The <strong>source code</strong> is available <a href="https://github.com/tdlib/telegram-bot-api">here</a>, along with a quick <a href="https://github.com/tdlib/telegram-bot-api#installation">installation guide</a>.</p>
|
||||
<p>After <strong>installing the server</strong>, remember to use the <a href="/bots/api#logout">logOut</a> method before <strong>redirecting requests</strong> to your new local API URL.</p>
|
||||
<blockquote>
|
||||
<p>Your local instance runs on port <code>8081</code> by default and will only accept HTTP requests, so a TLS termination proxy has to be used to handle remote HTTPS requests.</p>
|
||||
</blockquote>
|
||||
<p>By hosting our API locally you'll gain access to <strong>some upgrades</strong>, including:</p>
|
||||
<p>By hosting our API locally you'll gain access to <strong>some upgrades</strong>, including:</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -471,69 +476,68 @@ The <strong>source code</strong> is available <a href="https://github.com/tdlib/
|
|||
</tbody>
|
||||
</table>
|
||||
<blockquote>
|
||||
<p>You can find an exhaustive list <a href="/bots/api#using-a-local-bot-api-server">here</a>.
|
||||
All limits may be subject to change in the future, so make sure to follow <a href="https://t.me/botnews">@BotNews</a>.</p>
|
||||
<p>You can find an exhaustive list <a href="/bots/api#using-a-local-bot-api-server">here</a>.<br>All limits may be subject to change in the future, so make sure to follow <a href="https://t.me/botnews">@BotNews</a>.</p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<h3><a class="anchor" href="#botfather" id="botfather" name="botfather"><i class="anchor-icon"></i></a>BotFather</h3>
|
||||
<h3><a class="anchor" name="botfather" href="#botfather"><i class="anchor-icon"></i></a>BotFather</h3>
|
||||
<p>Below is a detailed guide to using <a href="https://t.me/botfather">@BotFather</a>, Telegram’s tool for <strong>creating</strong> and <strong>managing</strong> bots.</p>
|
||||
<h4><a class="anchor" href="#creating-a-new-bot" id="creating-a-new-bot" name="creating-a-new-bot"><i class="anchor-icon"></i></a>Creating a new bot</h4>
|
||||
<h4><a class="anchor" name="creating-a-new-bot" href="#creating-a-new-bot"><i class="anchor-icon"></i></a>Creating a new bot</h4>
|
||||
<p>Use the <code>/newbot</code> command to create a new bot. <a href="https://t.me/botfather">@BotFather</a> will ask you for a name and username, then generate an authentication token for your new bot.</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>The <strong>name</strong> of your bot is displayed in contact details and elsewhere.</p>
|
||||
<li><p>The <strong>name</strong> of your bot is displayed in contact details and elsewhere.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>The <strong>username</strong> is a short name, used in search, mentions and t.me links. Usernames are 5-32 characters long and not case sensitive – but may only include Latin characters, numbers, and underscores. Your bot's username must end in 'bot’, like 'tetris_bot' or 'TetrisBot'.</p>
|
||||
<li><p>The <strong>username</strong> is a short name, used in search, mentions and t.me links. Usernames are 5-32 characters long and not case sensitive – but may only include Latin characters, numbers, and underscores. Your bot's username must end in 'bot’, like 'tetris_bot' or 'TetrisBot'.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>The <strong>token</strong> is a string, like <code>110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw</code>, which is required to authorize the bot and send requests to the Bot API. Keep your token secure and store it safely, it can be used by anyone to control your bot. </p>
|
||||
<li><p>The <strong>token</strong> is a string, like <code>110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw</code>, which is required to authorize the bot and send requests to the Bot API. Keep your token secure and store it safely, it can be used by anyone to control your bot. </p>
|
||||
</li>
|
||||
</ul>
|
||||
<blockquote>
|
||||
<p>Unlike the bot’s name, the username cannot be changed later – so choose it carefully.
|
||||
When sending a request to api.telegram.org, remember to prefix the word ‘bot’ to your token.</p>
|
||||
<p>Unlike the bot’s name, the username cannot be changed later – so choose it carefully.<br>When sending a request to api.telegram.org, remember to prefix the word ‘bot’ to your token.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" href="#about-text-description-and-profile-media" id="about-text-description-and-profile-media" name="about-text-description-and-profile-media"><i class="anchor-icon"></i></a>About text, description and profile media</h4>
|
||||
<p>When new users open your bot, they will be met with a helpful description in a box titled "What can this bot do?".</p>
|
||||
<h4><a class="anchor" name="about-text-description-and-profile-media" href="#about-text-description-and-profile-media"><i class="anchor-icon"></i></a>About text, description and profile media</h4>
|
||||
<p>When new users open your bot, they will be met with a helpful description in a box titled “What can this bot do?”.</p>
|
||||
<p>Properly <a href="#edit-bots">setting this field</a> in <a href="https://t.me/botfather">@BotFather</a> allows everyone to immediately get an idea of what your bot can do – your description should be <strong>brief</strong>, <strong>to the point</strong> and <strong>on topic</strong>.</p>
|
||||
<blockquote>
|
||||
<p>You can also add a photo or video to this field with <code>Edit Description Picture</code> in <a href="https://t.me/botfather">@BotFather</a>.</p>
|
||||
</blockquote>
|
||||
<p>Additionally, just like normal users, bots also come with a <strong>short bio</strong> available on their profile. If you didn't specify this field while first creating your bot, you can set it at any time with the <code>/setabouttext</code> command in <a href="https://t.me/botfather">@BotFather</a>. Users can interact with many bots and they won't have access to their description after starting them – having a quick reminder of the bot's purpose can be very useful.</p>
|
||||
<p>Additionally, just like normal users, bots also come with a <strong>short bio</strong> available on their profile. If you didn't specify this field while first creating your bot, you can set it at any time with the <code>/setabouttext</code> command in <a href="https://t.me/botfather">@BotFather</a>. Users can interact with many bots and they won't have access to their description after starting them – having a quick reminder of the bot's purpose can be very useful.</p>
|
||||
<blockquote>
|
||||
<p>Note that both the <strong>Description</strong> and the <strong>About text</strong> can be <a href="https://core.telegram.org/bots/api#setmydescription">natively localized</a> – each user will automatically see the correct translation for their language.</p>
|
||||
</blockquote>
|
||||
<p>Bots can also have a <strong>profile picture</strong> – you should pick something unique and original so that users can find it in their chat list at a glance.</p>
|
||||
<blockquote>
|
||||
<p>Once set, the description, about text and profile pic can be <strong>replaced</strong> but never fully <strong>removed</strong>.</p>
|
||||
<p>Starting from April 21, 2023 (<a href="https://telegram.org/blog/shareable-folders-custom-wallpapers">Telegram 9.6</a>), you can edit your bot directly from its profile page – including setting a custom <strong>profile video</strong>.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" href="#generating-an-authentication-token" id="generating-an-authentication-token" name="generating-an-authentication-token"><i class="anchor-icon"></i></a>Generating an authentication token</h4>
|
||||
<h4><a class="anchor" name="generating-an-authentication-token" href="#generating-an-authentication-token"><i class="anchor-icon"></i></a>Generating an authentication token</h4>
|
||||
<p>If your existing token is <strong>compromised</strong> or <strong>you lost it</strong> for some reason, use the <code>/token</code> command to generate a new one.</p>
|
||||
<h4><a class="anchor" href="#transfer-ownership" id="transfer-ownership" name="transfer-ownership"><i class="anchor-icon"></i></a>Transfer ownership</h4>
|
||||
<p>You can transfer ownership of your bot <strong>to another user</strong>.
|
||||
To do this, send <code>/mybots</code>, select your bot, then <em>transfer ownership</em>.
|
||||
You can only transfer a bot to users who have interacted with it at least once.</p>
|
||||
<h4><a class="anchor" name="transfer-ownership" href="#transfer-ownership"><i class="anchor-icon"></i></a>Transfer ownership</h4>
|
||||
<p>You can transfer ownership of your bot <strong>to another user</strong>.<br>To do this, send <code>/mybots</code>, select your bot, then <em>transfer ownership</em>.<br>You can only transfer a bot to users who have interacted with it at least once.</p>
|
||||
<blockquote>
|
||||
<p>Transferring ownership will give full control of the bot to another user – they will be able to access the bot’s messages and even delete it. The transfer is permanent, so please consider it carefully.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" href="#botfather-commands" id="botfather-commands" name="botfather-commands"><i class="anchor-icon"></i></a>BotFather commands</h4>
|
||||
<h4><a class="anchor" name="botfather-commands" href="#botfather-commands"><i class="anchor-icon"></i></a>BotFather commands</h4>
|
||||
<p>The remaining commands are pretty self-explanatory:</p>
|
||||
<ul>
|
||||
<li>/mybots – returns a list of your bots with handy controls to edit their settings.</li>
|
||||
<li>/mygames – does the same for your games.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#edit-bots" id="edit-bots" name="edit-bots"><i class="anchor-icon"></i></a>Edit bots</h4>
|
||||
<h4><a class="anchor" name="edit-bots" href="#edit-bots"><i class="anchor-icon"></i></a>Edit bots</h4>
|
||||
<p>To edit your bot, you have two options.</p>
|
||||
<p>You can use the available commands:</p>
|
||||
<ul>
|
||||
<li>/setname – change your bot's <strong>name</strong>.</li>
|
||||
<li>/setdescription – change the bot's <strong>description</strong> (short text up to 512 characters). Users will see this text at the beginning of the conversation with the bot, titled '<em>What can this bot do?</em>'.</li>
|
||||
<li>/setabouttext – change the bot's <strong>about info</strong>, a shorter text up to 120 characters. Users will see this text on the bot's profile page. When they share your bot with someone, this text is sent together with the link.</li>
|
||||
<li>/setuserpic – change the bot's <strong>profile picture</strong>. </li>
|
||||
<li>/setname – change your bot's <strong>name</strong>.</li>
|
||||
<li>/setdescription – change the bot's <strong>description</strong> (short text up to 512 characters). Users will see this text at the beginning of the conversation with the bot, titled '<em>What can this bot do?</em>'.</li>
|
||||
<li>/setabouttext – change the bot's <strong>about info</strong>, a shorter text up to 120 characters. Users will see this text on the bot's profile page. When they share your bot with someone, this text is sent together with the link.</li>
|
||||
<li>/setuserpic – change the bot's <strong>profile picture</strong>. </li>
|
||||
<li>/setcommands – change the list of <strong>commands</strong> supported by your bot. Users will see these commands as suggestions when they type <code>/</code> in the chat with your bot. See <a href="#commands">commands</a> for more info.</li>
|
||||
<li>/setdomain – link a <strong>website domain</strong> to your bot. See the <a href="#widgets">login widget</a> section.</li>
|
||||
<li>/setdomain – link a <strong>website domain</strong> to your bot. See the <a href="#login-widget">login widget</a> section.</li>
|
||||
<li>/deletebot – delete your bot and <strong>free its username</strong>. Cannot be undone.</li>
|
||||
</ul>
|
||||
<p>Or you can use the <code>/mybots</code> command, tap on your bot and use the modern inline interface to edit it.</p>
|
||||
<h4><a class="anchor" href="#edit-settings" id="edit-settings" name="edit-settings"><i class="anchor-icon"></i></a>Edit settings</h4>
|
||||
<blockquote>
|
||||
<p>Starting from April 21, 2023 (<a href="https://telegram.org/blog/shareable-folders-custom-wallpapers">Telegram 9.6</a>), you can edit your bot's public-facing info directly from its profile page – including setting a custom <strong>profile video</strong>.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" name="edit-settings" href="#edit-settings"><i class="anchor-icon"></i></a>Edit settings</h4>
|
||||
<ul>
|
||||
<li>/setinline – toggle <strong>inline mode</strong> for your bot.</li>
|
||||
<li>/setinlinegeo – request <strong>location data</strong> to provide location-based inline results.</li>
|
||||
|
@ -541,7 +545,7 @@ You can only transfer a bot to users who have interacted with it at least once.<
|
|||
<li>/setinlinefeedback – toggle whether the API should <strong>send updates about the results</strong> chosen by users. See an in-depth explanation <a href="/bots/inline#collecting-feedback">here</a>.</li>
|
||||
<li>/setprivacy – set which messages your bot will receive when added to a group. See <a href="#privacy-mode">privacy-mode</a> for more info.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#manage-games" id="manage-games" name="manage-games"><i class="anchor-icon"></i></a>Manage games</h4>
|
||||
<h4><a class="anchor" name="manage-games" href="#manage-games"><i class="anchor-icon"></i></a>Manage games</h4>
|
||||
<ul>
|
||||
<li>/newgame – create a new game.</li>
|
||||
<li>/listgames – see a list of your games.</li>
|
||||
|
@ -555,8 +559,9 @@ You can only transfer a bot to users who have interacted with it at least once.<
|
|||
<p>With this information, you are ready to proceed to our <a href="/bots/api">Full API Reference for Developers</a>.</p>
|
||||
<ul>
|
||||
<li>If you have any questions, check out our <a href="/bots/faq">Bot FAQ</a>.</li>
|
||||
<li>If you're experiencing issues with our API, please contact <a href="https://t.me/botsupport">@BotSupport</a> on Telegram.</li>
|
||||
</ul></div>
|
||||
<li>If you're experiencing issues with our API, please contact <a href="https://t.me/botsupport">@BotSupport</a> on Telegram.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -47,365 +47,206 @@
|
|||
</blockquote>
|
||||
<p>This page lists some libraries and frameworks <strong>developed by the Telegram community</strong> – you should take care to report any bugs you may find to the respective developers, as these projects are not maintained by Telegram.</p>
|
||||
<p>Ping us on <a href="https://telegram.me/botsupport">@BotSupport</a> if you would like your library to appear on this page.</p>
|
||||
<h4><a class="anchor" href="#php" id="php" name="php"><i class="anchor-icon"></i></a>PHP</h4>
|
||||
<h4><a class="anchor" name="php" href="#php"><i class="anchor-icon"></i></a>PHP</h4>
|
||||
<ul>
|
||||
<li>
|
||||
<p><strong>Nutgram</strong>. The Telegram bot framework that doesn't drive you nuts.
|
||||
<a href="https://github.com/nutgram/nutgram">https://github.com/nutgram/nutgram</a></p>
|
||||
<li><p><strong>Nutgram</strong>. The Telegram bot framework that doesn't drive you nuts.<br><a href="https://github.com/nutgram/nutgram">https://github.com/nutgram/nutgram</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>klev-o/telegram-bot-api</strong>. Simple and convenient object-oriented implementation Telegram Bot API with PHP version ^7.4 support.
|
||||
<a href="https://github.com/klev-o/telegram-bot-api">https://github.com/klev-o/telegram-bot-api</a></p>
|
||||
<li><p><strong>klev-o/telegram-bot-api</strong>. Simple and convenient object-oriented implementation Telegram Bot API with PHP version ^7.4 support.<br><a href="https://github.com/klev-o/telegram-bot-api">https://github.com/klev-o/telegram-bot-api</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Telegraph</strong>. A Laravel package for fluently interacting with Telegram Bots.
|
||||
<a href="https://github.com/def-studio/telegraph">https://github.com/def-studio/telegraph</a></p>
|
||||
<li><p><strong>Telegraph</strong>. A Laravel package for fluently interacting with Telegram Bots.<br><a href="https://github.com/def-studio/telegraph">https://github.com/def-studio/telegraph</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>TeleBot</strong>. Easy way to create Telegram bots in PHP. Rich Laravel support out of the box.
|
||||
<a href="https://github.com/westacks/telebot">https://github.com/westacks/telebot</a></p>
|
||||
<li><p><strong>TeleBot</strong>. Easy way to create Telegram bots in PHP. Rich Laravel support out of the box.<br><a href="https://github.com/westacks/telebot">https://github.com/westacks/telebot</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>TuriBot</strong>. A simple way to communicate with Telegram APIs in PHP.
|
||||
<a href="https://github.com/davtur19/TuriBot">https://github.com/davtur19/TuriBot</a></p>
|
||||
<li><p><strong>TuriBot</strong>. A simple way to communicate with Telegram APIs in PHP.<br><a href="https://github.com/davtur19/TuriBot">https://github.com/davtur19/TuriBot</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>TelegramBotsApi</strong>. SDK for Telegram Bot API.
|
||||
<a href="https://github.com/kuvardin/TelegramBotsApi">https://github.com/kuvardin/TelegramBotsApi</a></p>
|
||||
<li><p><strong>TelegramBotsApi</strong>. SDK for Telegram Bot API.<br><a href="https://github.com/kuvardin/TelegramBotsApi">https://github.com/kuvardin/TelegramBotsApi</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>PHP Telegram Bot</strong>. PHP Telegram Bot based on the official Telegram Bot API.
|
||||
<a href="https://github.com/php-telegram-bot/core">https://github.com/php-telegram-bot/core</a></p>
|
||||
<li><p><strong>PHP Telegram Bot</strong>. PHP Telegram Bot based on the official Telegram Bot API.<br><a href="https://github.com/php-telegram-bot/core">https://github.com/php-telegram-bot/core</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Telegram Bot PHP</strong>. A library that makes using Telegram Bot API much easier.
|
||||
<a href="https://github.com/telegram-bot-php/core">https://github.com/telegram-bot-php/core</a></p>
|
||||
<li><p><strong>Telegram Bot PHP</strong>. A library that makes using Telegram Bot API much easier.<br><a href="https://github.com/telegram-bot-php/core">https://github.com/telegram-bot-php/core</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>PHP Telegram API</strong>. A complete async capable Telegram Bot API implementation for PHP7.
|
||||
<a href="https://github.com/unreal4u/telegram-api">https://github.com/unreal4u/telegram-api</a></p>
|
||||
<li><p><strong>PHP Telegram API</strong>. A complete async capable Telegram Bot API implementation for PHP7.<br><a href="https://github.com/unreal4u/telegram-api">https://github.com/unreal4u/telegram-api</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Telegram Bot Api Base</strong>. Clear and simple Telegram Bot API.
|
||||
<a href="https://github.com/tg-bot-api/bot-api-base">https://github.com/tg-bot-api/bot-api-base</a></p>
|
||||
<li><p><strong>Telegram Bot Api Base</strong>. Clear and simple Telegram Bot API.<br><a href="https://github.com/tg-bot-api/bot-api-base">https://github.com/tg-bot-api/bot-api-base</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>NeleBot X Framework</strong>. Framework for Telegram Bot API.
|
||||
<a href="https://github.com/NeleB54Gold/NeleBotX">https://github.com/NeleB54Gold/NeleBotX</a></p>
|
||||
<li><p><strong>NeleBot X Framework</strong>. Framework for Telegram Bot API.<br><a href="https://github.com/NeleB54Gold/NeleBotX">https://github.com/NeleB54Gold/NeleBotX</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Bot API PHP SDK</strong>. Telegram Bot API PHP SDK. Supports Laravel out of the box.
|
||||
<a href="https://github.com/irazasyed/telegram-bot-sdk">https://github.com/irazasyed/telegram-bot-sdk</a></p>
|
||||
<li><p><strong>Bot API PHP SDK</strong>. Telegram Bot API PHP SDK. Supports Laravel out of the box.<br><a href="https://github.com/irazasyed/telegram-bot-sdk">https://github.com/irazasyed/telegram-bot-sdk</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Simple Bot API</strong>. Simple & Easy Telegram Bot API.
|
||||
<a href="https://github.com/Muaath5/SimpleBotAPI">https://github.com/Muaath5/SimpleBotAPI</a></p>
|
||||
<li><p><strong>TgBotLib</strong>. A library for creating Telegram Bots in PHP, based on the Telegram Bot API.<br><a href="https://git.n64.cc/nosial/libs/tgbot">https://git.n64.cc/nosial/libs/tgbot</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>NovaGram</strong>. An Object-Oriented PHP library for Telegram Bots.
|
||||
<a href="https://github.com/skrtdev/NovaGram">https://github.com/skrtdev/NovaGram</a></p>
|
||||
<li><p><strong>PHP Telegram Bot Api</strong>. Native PHP Wrapper for Telegram BOT API.<br><a href="https://github.com/TelegramBot/Api">https://github.com/TelegramBot/Api</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>PHP Telegram Bot Api</strong>. Native PHP Wrapper for Telegram BOT API.
|
||||
<a href="https://github.com/TelegramBot/Api">https://github.com/TelegramBot/Api</a></p>
|
||||
<li><p><strong>NovaGram</strong>. An Object-Oriented PHP library for Telegram Bots.<br><a href="https://github.com/skrtdev/NovaGram">https://github.com/skrtdev/NovaGram</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#go" id="go" name="go"><i class="anchor-icon"></i></a>Go</h4>
|
||||
<h4><a class="anchor" name="go" href="#go"><i class="anchor-icon"></i></a>Go</h4>
|
||||
<ul>
|
||||
<li>
|
||||
<p><strong>Golang Telegram Bot library</strong>. An autogenerated wrapper for the Telegram Bot API. Inspired by the python-telegram-bot library.
|
||||
<a href="https://github.com/paulsonoflars/gotgbot">https://github.com/paulsonoflars/gotgbot</a></p>
|
||||
<li><p><strong>Golang Telegram Bot library</strong>. An autogenerated wrapper for the Telegram Bot API. Inspired by the python-telegram-bot library.<br><a href="https://github.com/paulsonoflars/gotgbot">https://github.com/paulsonoflars/gotgbot</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Telego</strong>. Telegram Bot API library.
|
||||
<a href="https://github.com/mymmrac/telego">https://github.com/mymmrac/telego</a></p>
|
||||
<li><p><strong>Telego</strong>. Telegram Bot API library.<br><a href="https://github.com/mymmrac/telego">https://github.com/mymmrac/telego</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Golang Telegram Bot</strong>. Telegram Bot API Go framework.
|
||||
<a href="https://github.com/go-telegram/bot">https://github.com/go-telegram/bot</a></p>
|
||||
<li><p><strong>Golang Telegram Bot</strong>. Telegram Bot API Go framework.<br><a href="https://github.com/go-telegram/bot">https://github.com/go-telegram/bot</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>echotron</strong>. An elegant and concurrent library for the Telegram Bot API.
|
||||
<a href="https://github.com/NicoNex/echotron">https://github.com/NicoNex/echotron</a></p>
|
||||
<li><p><strong>echotron</strong>. An elegant and concurrent library for the Telegram Bot API.<br><a href="https://github.com/NicoNex/echotron">https://github.com/NicoNex/echotron</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Telegram Bot API helper for Golang</strong>. A Telegram Bot API wrapper.
|
||||
<a href="https://github.com/meinside/telegram-bot-go">https://github.com/meinside/telegram-bot-go</a></p>
|
||||
<li><p><strong>Telegram Bot API helper for Golang</strong>. A Telegram Bot API wrapper.<br><a href="https://github.com/meinside/telegram-bot-go">https://github.com/meinside/telegram-bot-go</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>telebot</strong>. A Telegram bot framework.
|
||||
<a href="https://github.com/tucnak/telebot">https://github.com/tucnak/telebot</a></p>
|
||||
<li><p><strong>telebot</strong>. A Telegram bot framework.<br><a href="https://github.com/tucnak/telebot">https://github.com/tucnak/telebot</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Telegrambot</strong>. Telegram Bot API in Go, but with more clean code.
|
||||
<a href="https://github.com/nickname76/telegrambot">https://github.com/nickname76/telegrambot</a></p>
|
||||
<li><p><strong>Telegrambot</strong>. Telegram Bot API in Go, but with more clean code.<br><a href="https://github.com/nickname76/telegrambot">https://github.com/nickname76/telegrambot</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>go-telegram-bot-api</strong>. Bindings for the Telegram Bot API.
|
||||
<a href="https://github.com/go-telegram-bot-api/telegram-bot-api">https://github.com/go-telegram-bot-api/telegram-bot-api</a></p>
|
||||
<li><p><strong>go-telegram-bot-api</strong>. Bindings for the Telegram Bot API.<br><a href="https://github.com/go-telegram-bot-api/telegram-bot-api">https://github.com/go-telegram-bot-api/telegram-bot-api</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>go-tg</strong>. Library for accessing Telegram Bot API, with batteries for building complex bots included.
|
||||
<a href="https://github.com/mr-linch/go-tg">https://github.com/mr-linch/go-tg</a></p>
|
||||
<li><p><strong>go-tg</strong>. Library for accessing Telegram Bot API, with batteries for building complex bots included.<br><a href="https://github.com/mr-linch/go-tg">https://github.com/mr-linch/go-tg</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>TgWrap</strong>. A library with Telegram Bot API bindings.
|
||||
<a href="https://github.com/rogozhka/tgwrap">https://github.com/rogozhka/tgwrap</a></p>
|
||||
<li><p><strong>TgWrap</strong>. A library with Telegram Bot API bindings.<br><a href="https://github.com/rogozhka/tgwrap">https://github.com/rogozhka/tgwrap</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Telegram Bot API: Go implementation</strong>. A Telegram IM bots API implementation.
|
||||
<a href="https://github.com/temoon/telegram-bots-api">https://github.com/temoon/telegram-bots-api</a></p>
|
||||
<li><p><strong>Telegram Bot API: Go implementation</strong>. A Telegram IM bots API implementation.<br><a href="https://github.com/temoon/telegram-bots-api">https://github.com/temoon/telegram-bots-api</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#python" id="python" name="python"><i class="anchor-icon"></i></a>Python</h4>
|
||||
<h4><a class="anchor" name="python" href="#python"><i class="anchor-icon"></i></a>Python</h4>
|
||||
<ul>
|
||||
<li>
|
||||
<p><strong>python-telegram-bot</strong>. A wrapper you can't refuse.
|
||||
<a href="https://github.com/python-telegram-bot/python-telegram-bot">https://github.com/python-telegram-bot/python-telegram-bot</a></p>
|
||||
<li><p><strong>python-telegram-bot</strong>. A wrapper you can't refuse.<br><a href="https://github.com/python-telegram-bot/python-telegram-bot">https://github.com/python-telegram-bot/python-telegram-bot</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>pyTelegramBotAPI</strong>. A simple, but extensible Python implementation for the Telegram Bot API.
|
||||
<a href="https://github.com/eternnoir/pyTelegramBotAPI">https://github.com/eternnoir/pyTelegramBotAPI</a></p>
|
||||
<li><p><strong>pyTelegramBotAPI</strong>. A simple, but extensible Python implementation for the Telegram Bot API.<br><a href="https://github.com/eternnoir/pyTelegramBotAPI">https://github.com/eternnoir/pyTelegramBotAPI</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>AIOGram</strong>. A pretty simple and fully asynchronous library for Telegram Bot API written with asyncio and aiohttp.
|
||||
<a href="https://github.com/aiogram/aiogram">https://github.com/aiogram/aiogram</a></p>
|
||||
<li><p><strong>AIOGram</strong>. A pretty simple and fully asynchronous library for Telegram Bot API written with asyncio and aiohttp.<br><a href="https://github.com/aiogram/aiogram">https://github.com/aiogram/aiogram</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>TGramBot</strong>. A partially auto-generated and asynchronous Minimal Telegram Bot API framework.
|
||||
<a href="https://github.com/KeralaBots/TGramBot">https://github.com/KeralaBots/TGramBot</a></p>
|
||||
<li><p><strong>TGramBot</strong>. A partially auto-generated and asynchronous Minimal Telegram Bot API framework.<br><a href="https://github.com/KeralaBots/TGramBot">https://github.com/KeralaBots/TGramBot</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>OrigamiBot</strong>. A pythonic Telegram bot API library.
|
||||
<a href="https://github.com/cmd410/OrigamiBot">https://github.com/cmd410/OrigamiBot</a></p>
|
||||
<li><p><strong>OrigamiBot</strong>. A pythonic Telegram bot API library.<br><a href="https://github.com/cmd410/OrigamiBot">https://github.com/cmd410/OrigamiBot</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>pytgbot</strong>. A module to access the Telegram Bot API.
|
||||
<a href="https://github.com/luckydonald/pytgbot">https://github.com/luckydonald/pytgbot</a></p>
|
||||
<li><p><strong>pytgbot</strong>. A module to access the Telegram Bot API.<br><a href="https://github.com/luckydonald/pytgbot">https://github.com/luckydonald/pytgbot</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>teleflask</strong>. A framework based on flask and pytgbot.
|
||||
<a href="https://github.com/luckydonald/teleflask">https://github.com/luckydonald/teleflask</a></p>
|
||||
<li><p><strong>teleflask</strong>. A framework based on flask and pytgbot.<br><a href="https://github.com/luckydonald/teleflask">https://github.com/luckydonald/teleflask</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>telegram-text</strong>. A Python markup module, which can be used with other frameworks.
|
||||
<a href="https://github.com/SKY-ALIN/telegram-text">https://github.com/SKY-ALIN/telegram-text</a></p>
|
||||
<li><p><strong>telegram-text</strong>. A Python markup module, which can be used with other frameworks.<br><a href="https://github.com/SKY-ALIN/telegram-text">https://github.com/SKY-ALIN/telegram-text</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#rust" id="rust" name="rust"><i class="anchor-icon"></i></a>Rust</h4>
|
||||
<h4><a class="anchor" name="rust" href="#rust"><i class="anchor-icon"></i></a>Rust</h4>
|
||||
<ul>
|
||||
<li>
|
||||
<p><strong>Frankenstein</strong>. A Telegram Bot API client.
|
||||
<a href="https://github.com/ayrat555/frankenstein">https://github.com/ayrat555/frankenstein</a></p>
|
||||
<li><p><strong>Frankenstein</strong>. A Telegram Bot API client.<br><a href="https://github.com/ayrat555/frankenstein">https://github.com/ayrat555/frankenstein</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>teloxide</strong>. An elegant Telegram bots framework.
|
||||
<a href="https://github.com/teloxide/teloxide">https://github.com/teloxide/teloxide</a></p>
|
||||
<li><p><strong>teloxide</strong>. An elegant Telegram bots framework.<br><a href="https://github.com/teloxide/teloxide">https://github.com/teloxide/teloxide</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Ferrisgram</strong>. An asynchronous autogenerated wrapper for the Telegram Bot API.
|
||||
<a href="https://github.com/ferrisgram/ferrisgram">https://github.com/ferrisgram/ferrisgram</a></p>
|
||||
<li><p><strong>Ferrisgram</strong>. An asynchronous autogenerated wrapper for the Telegram Bot API.<br><a href="https://github.com/ferrisgram/ferrisgram">https://github.com/ferrisgram/ferrisgram</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>carapax</strong>. A Telegram Bot API framework.
|
||||
<a href="https://github.com/tg-rs/carapax">https://github.com/tg-rs/carapax</a></p>
|
||||
<li><p><strong>carapax</strong>. A Telegram Bot API framework.<br><a href="https://github.com/tg-rs/carapax">https://github.com/tg-rs/carapax</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>tgbotapi</strong>. A library for using the Telegram Bot API.
|
||||
<a href="https://github.com/Syfaro/tgbotapi-rs">https://github.com/Syfaro/tgbotapi-rs</a></p>
|
||||
<li><p><strong>tgbotapi</strong>. A library for using the Telegram Bot API.<br><a href="https://github.com/Syfaro/tgbotapi-rs">https://github.com/Syfaro/tgbotapi-rs</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>telegram-bot</strong>. A Library for creating a Telegram Bot.
|
||||
<a href="https://github.com/telegram-rs/telegram-bot">https://github.com/telegram-rs/telegram-bot</a></p>
|
||||
<li><p><strong>telegram-bot</strong>. A Library for creating a Telegram Bot.<br><a href="https://github.com/telegram-rs/telegram-bot">https://github.com/telegram-rs/telegram-bot</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Telebot</strong>. Write Telegram bots with Tokio and Futures.
|
||||
<a href="https://github.com/bytesnake/telebot">https://github.com/bytesnake/telebot</a></p>
|
||||
<li><p><strong>Telebot</strong>. Write Telegram bots with Tokio and Futures.<br><a href="https://github.com/bytesnake/telebot">https://github.com/bytesnake/telebot</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#kotlin" id="kotlin" name="kotlin"><i class="anchor-icon"></i></a>Kotlin</h4>
|
||||
<h4><a class="anchor" name="kotlin" href="#kotlin"><i class="anchor-icon"></i></a>Kotlin</h4>
|
||||
<ul>
|
||||
<li>
|
||||
<p><strong>TelegramBotAPI</strong>. Type-safe library for work with Telegram Bot API.
|
||||
<a href="https://github.com/InsanusMokrassar/TelegramBotAPI">https://github.com/InsanusMokrassar/TelegramBotAPI</a></p>
|
||||
<li><p><strong>TelegramBotAPI</strong>. Type-safe library for work with Telegram Bot API.<br><a href="https://github.com/InsanusMokrassar/TelegramBotAPI">https://github.com/InsanusMokrassar/TelegramBotAPI</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Kotlin Telegram Bot</strong>. Telegram Bot API wrapper, with handy Kotlin DSL.
|
||||
<a href="https://github.com/vendelieu/telegram-bot">https://github.com/vendelieu/telegram-bot</a></p>
|
||||
<li><p><strong>Kotlin Telegram Bot</strong>. Telegram Bot API wrapper, with handy Kotlin DSL.<br><a href="https://github.com/vendelieu/telegram-bot">https://github.com/vendelieu/telegram-bot</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Kotlin Telegram Bot</strong>. A wrapper for the Telegram Bot API.
|
||||
<a href="https://github.com/kotlin-telegram-bot/kotlin-telegram-bot">https://github.com/kotlin-telegram-bot/kotlin-telegram-bot</a></p>
|
||||
<li><p><strong>Kotlin Telegram Bot</strong>. A wrapper for the Telegram Bot API.<br><a href="https://github.com/kotlin-telegram-bot/kotlin-telegram-bot">https://github.com/kotlin-telegram-bot/kotlin-telegram-bot</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Telegram Bot API in Kotlin Multiplatform</strong>. Telegram Bot API in Kotlin.
|
||||
<a href="https://github.com/omarmiatello/telegram">https://github.com/omarmiatello/telegram</a></p>
|
||||
<li><p><strong>Telegram Bot API in Kotlin Multiplatform</strong>. Telegram Bot API in Kotlin.<br><a href="https://github.com/omarmiatello/telegram">https://github.com/omarmiatello/telegram</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>kt-telegram-bot</strong>. Telegram Bot API library for Kotlin language.
|
||||
<a href="https://github.com/elbekD/kt-telegram-bot">https://github.com/elbekD/kt-telegram-bot</a></p>
|
||||
<li><p><strong>kt-telegram-bot</strong>. Telegram Bot API library for Kotlin language.<br><a href="https://github.com/elbekD/kt-telegram-bot">https://github.com/elbekD/kt-telegram-bot</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Iris Telegram API</strong>. Yet another Telegram API bot created with Kotlin.
|
||||
<a href="https://github.com/iris2iris/iris-telegram-api">https://github.com/iris2iris/iris-telegram-api</a></p>
|
||||
<li><p><strong>Iris Telegram API</strong>. Yet another Telegram API bot created with Kotlin.<br><a href="https://github.com/iris2iris/iris-telegram-api">https://github.com/iris2iris/iris-telegram-api</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#nodejs" id="nodejs" name="nodejs"><i class="anchor-icon"></i></a>Node.js</h4>
|
||||
<h4><a class="anchor" name="node-js" href="#node-js"><i class="anchor-icon"></i></a>Node.js</h4>
|
||||
<ul>
|
||||
<li>
|
||||
<p><strong>Telegraf</strong>. Modern Telegram Bot Framework for Node.js.
|
||||
<a href="https://github.com/telegraf/telegraf">https://github.com/telegraf/telegraf</a></p>
|
||||
<li><p><strong>Telegraf</strong>. Modern Telegram Bot Framework for Node.js.<br><a href="https://github.com/telegraf/telegraf">https://github.com/telegraf/telegraf</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Node-Telegram-bot</strong>. Node.js module to interact with the official Telegram Bot API.
|
||||
<a href="https://github.com/yagop/node-telegram-bot-api">https://github.com/yagop/node-telegram-bot-api</a></p>
|
||||
<li><p><strong>Node-Telegram-bot</strong>. Node.js module to interact with the official Telegram Bot API.<br><a href="https://github.com/yagop/node-telegram-bot-api">https://github.com/yagop/node-telegram-bot-api</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Telebot</strong>. The easy way to write Telegram bots.
|
||||
<a href="https://github.com/mullwar/telebot">https://github.com/mullwar/telebot</a></p>
|
||||
<li><p><strong>Telebot</strong>. The easy way to write Telegram bots.<br><a href="https://github.com/mullwar/telebot">https://github.com/mullwar/telebot</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Slimbot</strong>. A fuss-free, thin wrapper around Telegram Bot API for Node.js. No frills.
|
||||
<a href="https://github.com/edisonchee/slimbot">https://github.com/edisonchee/slimbot</a></p>
|
||||
<li><p><strong>Slimbot</strong>. A fuss-free, thin wrapper around Telegram Bot API for Node.js. No frills.<br><a href="https://github.com/edisonchee/slimbot">https://github.com/edisonchee/slimbot</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#net" id="net" name="net"><i class="anchor-icon"></i></a>.NET</h4>
|
||||
<h4><a class="anchor" name="net" href="#net"><i class="anchor-icon"></i></a>.NET</h4>
|
||||
<ul>
|
||||
<li>
|
||||
<p><strong>Telegram.bot</strong>. .NET Client for Telegram Bot API.
|
||||
<a href="https://github.com/TelegramBots/Telegram.Bot">https://github.com/TelegramBots/Telegram.Bot</a></p>
|
||||
<li><p><strong>Telegram.bot</strong>. .NET Client for Telegram Bot API.<br><a href="https://github.com/TelegramBots/Telegram.Bot">https://github.com/TelegramBots/Telegram.Bot</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Telegram.Bots</strong>. A .NET 5 wrapper for the Telegram Bot API.
|
||||
<a href="https://github.com/TelegramBotsAPI/Telegram.Bots">https://github.com/TelegramBotsAPI/Telegram.Bots</a></p>
|
||||
<li><p><strong>Telegram.Bots</strong>. A .NET 5 wrapper for the Telegram Bot API.<br><a href="https://github.com/TelegramBotsAPI/Telegram.Bots">https://github.com/TelegramBotsAPI/Telegram.Bots</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>RxTelegram.Bot</strong>. RxTelegram uses a reactive approach to make Updates available.
|
||||
<a href="https://github.com/RxTelegram/RxTelegram.Bot">https://github.com/RxTelegram/RxTelegram.Bot</a></p>
|
||||
<li><p><strong>RxTelegram.Bot</strong>. RxTelegram uses a reactive approach to make Updates available.<br><a href="https://github.com/RxTelegram/RxTelegram.Bot">https://github.com/RxTelegram/RxTelegram.Bot</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Telegram.BotAPI for NET</strong>. One of the most complete libraries available to interact with the Telegram Bot API.
|
||||
<a href="https://github.com/Eptagone/Telegram.BotAPI">https://github.com/Eptagone/Telegram.BotAPI</a></p>
|
||||
<li><p><strong>Telegram.BotAPI for NET</strong>. One of the most complete libraries available to interact with the Telegram Bot API.<br><a href="https://github.com/Eptagone/Telegram.BotAPI">https://github.com/Eptagone/Telegram.BotAPI</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#swift" id="swift" name="swift"><i class="anchor-icon"></i></a>Swift</h4>
|
||||
<h4><a class="anchor" name="swift" href="#swift"><i class="anchor-icon"></i></a>Swift</h4>
|
||||
<ul>
|
||||
<li>
|
||||
<p><strong>Telegram Vapor Bot</strong>. The wrapper for the Telegram Bot API written in Swift with Vapor.
|
||||
<a href="https://github.com/nerzh/telegram-vapor-bot">https://github.com/nerzh/telegram-vapor-bot</a></p>
|
||||
<li><p><strong>Telegram Vapor Bot</strong>. The wrapper for the Telegram Bot API written in Swift with Vapor.<br><a href="https://github.com/nerzh/telegram-vapor-bot">https://github.com/nerzh/telegram-vapor-bot</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>telegram-bot-swift</strong>. Telegram Bot SDK for Swift.
|
||||
<a href="https://github.com/rapierorg/telegram-bot-swift">https://github.com/rapierorg/telegram-bot-swift</a></p>
|
||||
<li><p><strong>telegram-bot-swift</strong>. Telegram Bot SDK for Swift.<br><a href="https://github.com/rapierorg/telegram-bot-swift">https://github.com/rapierorg/telegram-bot-swift</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Telegrammer</strong>. Telegram Bot Framework written in Swift 5.1 with SwiftNIO network framework.
|
||||
<a href="https://github.com/givip/Telegrammer">https://github.com/givip/Telegrammer</a></p>
|
||||
<li><p><strong>Telegrammer</strong>. Telegram Bot Framework written in Swift 5.1 with SwiftNIO network framework.<br><a href="https://github.com/givip/Telegrammer">https://github.com/givip/Telegrammer</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#typescript" id="typescript" name="typescript"><i class="anchor-icon"></i></a>TypeScript</h4>
|
||||
<h4><a class="anchor" name="typescript" href="#typescript"><i class="anchor-icon"></i></a>TypeScript</h4>
|
||||
<ul>
|
||||
<li>
|
||||
<p><strong>grammY</strong>. The Telegram Bot Framework.
|
||||
<a href="https://github.com/grammyjs/grammY">https://github.com/grammyjs/grammY</a></p>
|
||||
<li><p><strong>grammY</strong>. The Telegram Bot Framework.<br><a href="https://github.com/grammyjs/grammY">https://github.com/grammyjs/grammY</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Nestgram</strong>. Framework for working with Telegram Bot API on TypeScript like Nest.js.
|
||||
<a href="https://github.com/Degreet/nestgram">https://github.com/Degreet/nestgram</a></p>
|
||||
<li><p><strong>Nestgram</strong>. Framework for working with Telegram Bot API on TypeScript like Nest.js.<br><a href="https://github.com/Degreet/nestgram">https://github.com/Degreet/nestgram</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>puregram</strong>. Powerful and modern telegram bot api sdk for node.js and typescript.
|
||||
<a href="https://github.com/nitreojs/puregram">https://github.com/nitreojs/puregram</a></p>
|
||||
<li><p><strong>puregram</strong>. Powerful and modern telegram bot api sdk for node.js and typescript.<br><a href="https://github.com/nitreojs/puregram">https://github.com/nitreojs/puregram</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#java" id="java" name="java"><i class="anchor-icon"></i></a>Java</h4>
|
||||
<h4><a class="anchor" name="java" href="#java"><i class="anchor-icon"></i></a>Java</h4>
|
||||
<ul>
|
||||
<li>
|
||||
<p><strong>TelegramBots</strong>. A simple to use library to create Telegram Bots.
|
||||
<a href="https://github.com/rubenlagus/TelegramBots">https://github.com/rubenlagus/TelegramBots</a></p>
|
||||
<li><p><strong>TelegramBots</strong>. A simple to use library to create Telegram Bots.<br><a href="https://github.com/rubenlagus/TelegramBots">https://github.com/rubenlagus/TelegramBots</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Java API</strong>. Telegram Bot API for Java.
|
||||
<a href="https://github.com/pengrad/java-telegram-bot-api">https://github.com/pengrad/java-telegram-bot-api</a></p>
|
||||
<li><p><strong>Java API</strong>. Telegram Bot API for Java.<br><a href="https://github.com/pengrad/java-telegram-bot-api">https://github.com/pengrad/java-telegram-bot-api</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>ReBot</strong>. A Java EE Telegram Bot API.
|
||||
<a href="https://github.com/rebasing-xyz/rebot">https://github.com/rebasing-xyz/rebot</a></p>
|
||||
<li><p><strong>ReBot</strong>. A Java EE Telegram Bot API.<br><a href="https://github.com/rebasing-xyz/rebot">https://github.com/rebasing-xyz/rebot</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#scala" id="scala" name="scala"><i class="anchor-icon"></i></a>Scala</h4>
|
||||
<h4><a class="anchor" name="scala" href="#scala"><i class="anchor-icon"></i></a>Scala</h4>
|
||||
<ul>
|
||||
<li>
|
||||
<p><strong>canoe</strong>. Functional Telegram Bot API.
|
||||
<a href="https://github.com/augustjune/canoe">https://github.com/augustjune/canoe</a></p>
|
||||
<li><p><strong>canoe</strong>. Functional Telegram Bot API.<br><a href="https://github.com/augustjune/canoe">https://github.com/augustjune/canoe</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>bot4s.telegram</strong>. Simple, extensible, strongly-typed wrapper for the Telegram Bot API.
|
||||
<a href="https://github.com/bot4s/telegram">https://github.com/bot4s/telegram</a></p>
|
||||
<li><p><strong>bot4s.telegram</strong>. Simple, extensible, strongly-typed wrapper for the Telegram Bot API.<br><a href="https://github.com/bot4s/telegram">https://github.com/bot4s/telegram</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>F[Tg] - Telegramium</strong>. Pure functional Telegram Bot API implementation.
|
||||
<a href="https://github.com/apimorphism/telegramium">https://github.com/apimorphism/telegramium</a></p>
|
||||
<li><p><strong>F[Tg] - Telegramium</strong>. Pure functional Telegram Bot API implementation.<br><a href="https://github.com/apimorphism/telegramium">https://github.com/apimorphism/telegramium</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#ruby" id="ruby" name="ruby"><i class="anchor-icon"></i></a>Ruby</h4>
|
||||
<h4><a class="anchor" name="ruby" href="#ruby"><i class="anchor-icon"></i></a>Ruby</h4>
|
||||
<ul>
|
||||
<li>
|
||||
<p><strong>Telegram::Bot</strong>. Ruby gem for building Telegram Bot with optional Rails integration.
|
||||
<a href="https://github.com/telegram-bot-rb/telegram-bot">https://github.com/telegram-bot-rb/telegram-bot</a></p>
|
||||
<li><p><strong>Telegram::Bot</strong>. Ruby gem for building Telegram Bot with optional Rails integration.<br><a href="https://github.com/telegram-bot-rb/telegram-bot">https://github.com/telegram-bot-rb/telegram-bot</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>telegram-bot-ruby</strong>. Ruby wrapper for Telegram's Bot API.
|
||||
<a href="https://github.com/atipugin/telegram-bot-ruby">https://github.com/atipugin/telegram-bot-ruby</a></p>
|
||||
<li><p><strong>telegram-bot-ruby</strong>. Ruby wrapper for Telegram's Bot API.<br><a href="https://github.com/atipugin/telegram-bot-ruby">https://github.com/atipugin/telegram-bot-ruby</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#other-languages" id="other-languages" name="other-languages"><i class="anchor-icon"></i></a>Other Languages</h4>
|
||||
<h4><a class="anchor" name="other-languages" href="#other-languages"><i class="anchor-icon"></i></a>Other Languages</h4>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Elixir. <strong>ExGram</strong>. Telegram Bot API low level API and framework.
|
||||
<a href="https://github.com/rockneurotiko/ex_gram">https://github.com/rockneurotiko/ex_gram</a></p>
|
||||
<li><p>Elixir. <strong>ExGram</strong>. Telegram Bot API low level API and framework.<br><a href="https://github.com/rockneurotiko/ex_gram">https://github.com/rockneurotiko/ex_gram</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Elixir. <strong>Nadia</strong>. Telegram Bot API Wrapper.
|
||||
<a href="https://github.com/zhyu/nadia">https://github.com/zhyu/nadia</a></p>
|
||||
<li><p>Elixir. <strong>Nadia</strong>. Telegram Bot API Wrapper.<br><a href="https://github.com/zhyu/nadia">https://github.com/zhyu/nadia</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>C++. <strong>tgbot-cpp</strong>. A library for Telegram Bot API.
|
||||
<a href="https://github.com/reo7sp/tgbot-cpp">https://github.com/reo7sp/tgbot-cpp</a></p>
|
||||
<li><p>C++. <strong>tgbot-cpp</strong>. A library for Telegram Bot API.<br><a href="https://github.com/reo7sp/tgbot-cpp">https://github.com/reo7sp/tgbot-cpp</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>C++. <strong>tgbot</strong>. A library for Telegram Bot API with generated API types and methods.
|
||||
<a href="https://github.com/egorpugin/tgbot">https://github.com/egorpugin/tgbot</a></p>
|
||||
<li><p>C++. <strong>tgbot</strong>. A library for Telegram Bot API with generated API types and methods.<br><a href="https://github.com/egorpugin/tgbot">https://github.com/egorpugin/tgbot</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Dart. <strong>TeleDart</strong>. A library interfacing with the latest Telegram Bot API.
|
||||
<a href="https://github.com/DinoLeung/TeleDart">https://github.com/DinoLeung/TeleDart</a></p>
|
||||
<li><p>Dart. <strong>TeleDart</strong>. A library interfacing with the latest Telegram Bot API.<br><a href="https://github.com/DinoLeung/TeleDart">https://github.com/DinoLeung/TeleDart</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Pascal. <strong>TGBotMini</strong>. Telegram Bot Mini API.
|
||||
<a href="https://github.com/HemulGM/TGBotMini">https://github.com/HemulGM/TGBotMini</a></p>
|
||||
<li><p>Pascal. <strong>TGBotMini</strong>. Telegram Bot Mini API.<br><a href="https://github.com/HemulGM/TGBotMini">https://github.com/HemulGM/TGBotMini</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Clojure. <strong>telegrambot-lib</strong>. A library for interacting with the Telegram Bot API.
|
||||
<a href="https://github.com/wdhowe/telegrambot-lib">https://github.com/wdhowe/telegrambot-lib</a></p>
|
||||
<li><p>Clojure. <strong>telegrambot-lib</strong>. A library for interacting with the Telegram Bot API.<br><a href="https://github.com/wdhowe/telegrambot-lib">https://github.com/wdhowe/telegrambot-lib</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Lua. <strong>telegram-bot-lua</strong>. A feature-filled Telegram Bot API library.
|
||||
<a href="https://github.com/wrxck/telegram-bot-lua">https://github.com/wrxck/telegram-bot-lua</a></p>
|
||||
<li><p>Lua. <strong>telegram-bot-lua</strong>. A feature-filled Telegram Bot API library.<br><a href="https://github.com/wrxck/telegram-bot-lua">https://github.com/wrxck/telegram-bot-lua</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>OCaml. <strong>TelegraML</strong>. A library for creating bots for Telegram.
|
||||
<a href="https://github.com/nv-vn/TelegraML">https://github.com/nv-vn/TelegraML</a></p>
|
||||
<li><p>OCaml. <strong>TelegraML</strong>. A library for creating bots for Telegram.<br><a href="https://github.com/nv-vn/TelegraML">https://github.com/nv-vn/TelegraML</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Haskell. <strong>haskell-telegram-api</strong>. High-level bindings to the Telegram Bot API based on <a href="https://haskell-servant.github.io/">servant</a> library.
|
||||
<a href="https://github.com/klappvisor/haskell-telegram-api">https://github.com/klappvisor/haskell-telegram-api</a></p>
|
||||
<li><p>Haskell. <strong>haskell-telegram-api</strong>. High-level bindings to the Telegram Bot API based on <a href="https://haskell-servant.github.io/">servant</a> library.<br><a href="https://github.com/klappvisor/haskell-telegram-api">https://github.com/klappvisor/haskell-telegram-api</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Perl. <strong>Telegram Bot</strong>. A genuine Perl 6 client for the Telegram's Bot API.
|
||||
<a href="https://github.com/GildedHonour/TelegramBot">https://github.com/GildedHonour/TelegramBot</a></p>
|
||||
<li><p>Perl. <strong>Telegram Bot</strong>. A genuine Perl 6 client for the Telegram's Bot API.<br><a href="https://github.com/GildedHonour/TelegramBot">https://github.com/GildedHonour/TelegramBot</a></p>
|
||||
</li>
|
||||
</ul></div>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>Web Apps for Bots</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Telegram bots can completely replace any website. They support seamless authorization, integrated payments via 15 payment…">
|
||||
<meta property="description" content="Telegram bots can completely replace any website. They support seamless authorization, integrated payments via 20 payment…">
|
||||
<meta property="og:title" content="Web Apps for Bots">
|
||||
<meta property="og:image" content="https://corefork.telegram.org/file/464001702/1194c/mBQhTbIWqw8.451557/08727d5d763e24d750">
|
||||
<meta property="og:description" content="Telegram bots can completely replace any website. They support seamless authorization, integrated payments via 15 payment…">
|
||||
<meta property="og:image" content="https://corefork.telegram.org/file/464001388/10b1a/IYpn0wWfggw.1156850/fd9a32baa81dcecbe4">
|
||||
<meta property="og:description" content="Telegram bots can completely replace any website. They support seamless authorization, integrated payments via 20 payment…">
|
||||
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
|
@ -44,32 +44,39 @@
|
|||
|
||||
<div id="dev_page_content"><!-- scroll_nav -->
|
||||
|
||||
<p>Telegram bots can completely replace <strong>any website</strong>. They support <a href="https://telegram.org/blog/privacy-discussions-web-bots#meet-seamless-web-bots">seamless authorization</a>, <a href="https://core.telegram.org/bots/payments">integrated payments</a> via <strong>15</strong> payment providers (with <em>Google Pay</em> and <em>Apple Pay</em> out of the box), delivering tailored push notifications to users, and <a href="https://core.telegram.org/bots">much more</a>.</p>
|
||||
<p>Telegram bots can completely replace <strong>any website</strong>. They support <a href="https://telegram.org/blog/privacy-discussions-web-bots#meet-seamless-web-bots">seamless authorization</a>, <a href="https://core.telegram.org/bots/payments">integrated payments</a> via <strong>20</strong> payment providers (with <em>Google Pay</em> and <em>Apple Pay</em> out of the box), delivering tailored push notifications to users, and <a href="https://core.telegram.org/bots">much more</a>.</p>
|
||||
<p>With <strong>Web Apps</strong>, bots get a whole new dimension. Bot developers can create <strong>infinitely flexible interfaces</strong> with <em>JavaScript</em>, the most widely used programming language in the world.</p>
|
||||
<div class="blog_video_player_wrap" style="max-width: 600px; margin: 20px auto 20px;">
|
||||
<video class="blog_video_player tl_blog_vid_autoplay" onclick="videoTogglePlay(this)" autoplay loop controls muted poster="/file/464001434/100bf/eWprjdgzEbE.100386/644bbea83084f44c8f" style="max-width: 600px;" title="console.log('Vive la révolution')" alt="Bot Revolution">
|
||||
<source src="/file/464001679/11aa9/KQx_BlPVXRo.4922145.mp4/c65433c8ac11a347a8" type="video/mp4">
|
||||
</source></video>
|
||||
</video>
|
||||
</div>
|
||||
|
||||
<blockquote>
|
||||
<p>To see a <strong>Web App</strong> in action, try our sample <a href="https://t.me/durgerkingbot">@DurgerKingBot</a>.</p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<h3><a class="anchor" href="#recent-changes" id="recent-changes" name="recent-changes"><i class="anchor-icon"></i></a>Recent changes</h3>
|
||||
<h4><a class="anchor" href="#december-30-2022" id="december-30-2022" name="december-30-2022"><i class="anchor-icon"></i></a>December 30, 2022</h4>
|
||||
<h3><a class="anchor" name="recent-changes" href="#recent-changes"><i class="anchor-icon"></i></a>Recent changes</h3>
|
||||
<h4><a class="anchor" name="april-21-2023" href="#april-21-2023"><i class="anchor-icon"></i></a>April 21, 2023</h4>
|
||||
<p><strong>Bot API 6.7</strong></p>
|
||||
<ul>
|
||||
<li>Added support for launching Web Apps from inline query results and from a direct link.</li>
|
||||
<li>Added the method <em>switchInlineQuery</em> to the class <a href="#initializing-web-apps">WebApp</a>.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" name="december-30-2022" href="#december-30-2022"><i class="anchor-icon"></i></a>December 30, 2022</h4>
|
||||
<p><strong>Bot API 6.4</strong></p>
|
||||
<ul>
|
||||
<li>Added the field <em>platform</em>, the optional parameter <em>options</em> to the method <em>openLink</em> and the methods <em>showScanQrPopup</em>, <em>closeScanQrPopup</em>, <em>readTextFromClipboard</em> to the class <a href="#initializing-web-apps">WebApp</a>.</li>
|
||||
<li>Added the events <em>qrTextReceived</em>, <em>clipboardTextReceived</em>.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#august-12-2022" id="august-12-2022" name="august-12-2022"><i class="anchor-icon"></i></a>August 12, 2022</h4>
|
||||
<h4><a class="anchor" name="august-12-2022" href="#august-12-2022"><i class="anchor-icon"></i></a>August 12, 2022</h4>
|
||||
<p><strong>Bot API 6.2</strong></p>
|
||||
<ul>
|
||||
<li>Added the field <em>isClosingConfirmationEnabled</em> and the methods <em>enableClosingConfirmation</em>, <em>disableClosingConfirmation</em>, <em>showPopup</em>, <em>showAlert</em>, <em>showConfirm</em> to the class <a href="#initializing-web-apps">WebApp</a>.</li>
|
||||
<li>Added the field <em>is_premium</em> to the class <a href="#webappuser">WebAppUser</a>.</li>
|
||||
<li>Added the event <em>popupClosed</em>.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#june-20-2022" id="june-20-2022" name="june-20-2022"><i class="anchor-icon"></i></a>June 20, 2022</h4>
|
||||
<h4><a class="anchor" name="june-20-2022" href="#june-20-2022"><i class="anchor-icon"></i></a>June 20, 2022</h4>
|
||||
<p><strong>Bot API 6.1</strong></p>
|
||||
<ul>
|
||||
<li>Added the ability to use bots added to the attachment menu in group, supergroup and channel chats.</li>
|
||||
|
@ -81,18 +88,19 @@
|
|||
<li>Added the <a href="#events-available-for-web-apps">events</a> <em>backButtonClicked</em>, <em>settingsButtonClicked</em>, <em>invoiceClosed</em>.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<h3><a class="anchor" href="#designing-web-apps" id="designing-web-apps" name="designing-web-apps"><i class="anchor-icon"></i></a>Designing Web Apps</h3>
|
||||
<h4><a class="anchor" href="#color-schemes" id="color-schemes" name="color-schemes"><i class="anchor-icon"></i></a>Color Schemes</h4>
|
||||
<p>Web Apps always receive data about the user's current <strong>color theme</strong> in real time, so you can adjust the appearance of your interfaces to match it. For example, when users switch between <strong>Day and Night</strong> modes or use various <a href="https://telegram.org/blog/protected-content-delete-by-date-and-more#global-chat-themes-on-android">custom themes</a>.</p>
|
||||
<h3><a class="anchor" name="designing-web-apps" href="#designing-web-apps"><i class="anchor-icon"></i></a>Designing Web Apps</h3>
|
||||
<h4><a class="anchor" name="color-schemes" href="#color-schemes"><i class="anchor-icon"></i></a>Color Schemes</h4>
|
||||
<p>Web Apps always receive data about the user's current <strong>color theme</strong> in real time, so you can adjust the appearance of your interfaces to match it. For example, when users switch between <strong>Day and Night</strong> modes or use various <a href="https://telegram.org/blog/protected-content-delete-by-date-and-more#global-chat-themes-on-android">custom themes</a>.</p>
|
||||
<div class="blog_video_player_wrap" style="max-width: 600px; margin: 20px auto 20px;">
|
||||
<video class="blog_video_player tl_blog_vid_autoplay" onclick="videoTogglePlay(this)" autoplay loop controls muted poster="/file/464001576/10249/wikoQUNnrH4.112118/7b6c8d3366ada2615b" style="max-width: 600px;" title="" alt="Switching Colors">
|
||||
<source src="/file/464001257/12087/QNQUbIi864k.909800.mp4/8ea7adad7db407388e" type="video/mp4">
|
||||
</source></video>
|
||||
</video>
|
||||
</div>
|
||||
|
||||
<blockquote>
|
||||
<p><a href="#themeparams">Jump to technical information</a></p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" href="#design-guidelines" id="design-guidelines" name="design-guidelines"><i class="anchor-icon"></i></a>Design Guidelines</h4>
|
||||
<h4><a class="anchor" name="design-guidelines" href="#design-guidelines"><i class="anchor-icon"></i></a>Design Guidelines</h4>
|
||||
<p>Telegram apps are known for being snappy, smooth and following a consistent cross-platform design. Your Web App should ideally reflect these principles.</p>
|
||||
<ul>
|
||||
<li>All elements should be responsive and designed with a mobile-first approach.</li>
|
||||
|
@ -102,12 +110,13 @@
|
|||
<li>The app should deliver a seamless experience by monitoring the <a href="#color-schemes">dynamic theme-based colors</a> provided by the API and using them accordingly.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<h3><a class="anchor" href="#implementing-web-apps" id="implementing-web-apps" name="implementing-web-apps"><i class="anchor-icon"></i></a>Implementing Web Apps</h3>
|
||||
<p>Telegram currently supports four different ways of launching Web Apps: from a <a href="#keyboard-button-web-apps">keyboard button</a>, from an <a href="#inline-button-web-apps">inline button</a>, from the <a href="#launching-web-apps-from-the-menu-button">bot menu button</a> – and even from the <a href="#launching-web-apps-from-the-attachment-menu">attachment menu</a>.</p>
|
||||
<div class="blog_image_wrap blog_medium_image_wrap">
|
||||
<a href="/file/464001702/1194c/mBQhTbIWqw8.451557/08727d5d763e24d750" target="_blank"><img src="/file/464001702/1194c/mBQhTbIWqw8.451557/08727d5d763e24d750" title="" alt="Types of buttons" srcset="/file/464001702/1194c/mBQhTbIWqw8.451557/08727d5d763e24d750 , 2x"></a>
|
||||
<h3><a class="anchor" name="implementing-web-apps" href="#implementing-web-apps"><i class="anchor-icon"></i></a>Implementing Web Apps</h3>
|
||||
<p>Telegram currently supports six different ways of launching Web Apps: from a <a href="#keyboard-button-web-apps">keyboard button</a>, from an <a href="#inline-button-web-apps">inline button</a>, from the <a href="#launching-web-apps-from-the-menu-button">bot menu button</a>, via <a href="#inline-mode-web-apps">inline mode</a>, from a <a href="#direct-link-web-apps">direct link</a> – and even from the <a href="#launching-web-apps-from-the-attachment-menu">attachment menu</a>.</p>
|
||||
<div>
|
||||
<a href="/file/464001388/10b1a/IYpn0wWfggw.1156850/fd9a32baa81dcecbe4" target="_blank"><img src="/file/464001388/10b1a/IYpn0wWfggw.1156850/fd9a32baa81dcecbe4" title="" alt="Types of buttons" class="dev_page_image" /></a>
|
||||
</div>
|
||||
<h4><a class="anchor" href="#keyboard-button-web-apps" id="keyboard-button-web-apps" name="keyboard-button-web-apps"><i class="anchor-icon"></i></a>Keyboard Button Web Apps</h4>
|
||||
|
||||
<h4><a class="anchor" name="keyboard-button-web-apps" href="#keyboard-button-web-apps"><i class="anchor-icon"></i></a>Keyboard Button Web Apps</h4>
|
||||
<blockquote>
|
||||
<p><strong>TL;DR:</strong> Web Apps launched from a <strong>web_app</strong> type <a href="/bots/api#keyboardbutton">keyboard button</a> can send data back to the bot in a <em>service message</em> using <a href="#initializing-web-apps">Telegram.WebApp.sendData</a>. This makes it possible for the bot to produce a response without communicating with any external servers.</p>
|
||||
</blockquote>
|
||||
|
@ -116,58 +125,84 @@
|
|||
<p>To transmit data from the user back to the bot, the Web App can call the <a href="#initializing-web-apps">Telegram.WebApp.sendData</a> method. Data will be transmitted to the bot as a String in a service message. The bot can continue communicating with the user after receiving it.</p>
|
||||
<p><strong>Good for:</strong></p>
|
||||
<ul>
|
||||
<li><strong>Сustom data input interfaces</strong> (a personalized calendar for selecting dates; selecting data from a list with advanced search options; a randomizer that lets the user "spin a wheel" and chooses one of the available options, etc.)</li>
|
||||
<li><strong>Сustom data input interfaces</strong> (a personalized calendar for selecting dates; selecting data from a list with advanced search options; a randomizer that lets the user “spin a wheel” and chooses one of the available options, etc.)</li>
|
||||
<li><strong>Reusable components</strong> that do not depend on a particular bot.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#inline-button-web-apps" id="inline-button-web-apps" name="inline-button-web-apps"><i class="anchor-icon"></i></a>Inline Button Web Apps</h4>
|
||||
<h4><a class="anchor" name="inline-button-web-apps" href="#inline-button-web-apps"><i class="anchor-icon"></i></a>Inline Button Web Apps</h4>
|
||||
<blockquote>
|
||||
<p><strong>TL;DR:</strong> For more interactive Web Apps like <a href="https://t.me/durgerkingbot">@DurgerKingBot</a>, use a <strong>web_app</strong> type <a href="/bots/api#inlinekeyboardbutton">Inline KeyboardButton</a>, which gets basic user information and can be used to send a message on behalf of the user to the chat with the bot.</p>
|
||||
</blockquote>
|
||||
<p>If receiving text data alone is insufficient or you need a more advanced and personalized interface, you can open a Web App using a <strong>web_app</strong> type <a href="/bots/api#inlinekeyboardbutton">Inline KeyboardButton</a>.</p>
|
||||
<p>From the button, a Web App will open with the URL specified in the button. In addition to the user's <a href="#color-schemes">theme settings</a>, it will receive basic user information (<code>ID</code>, <code>name</code>, <code>username</code>, <code>language_code</code>) and a unique identifier for the session, <strong>query_id</strong>, which allows messages on behalf of the user to be sent back to the bot.</p>
|
||||
<p>From the button, a Web App will open with the URL specified in the button. In addition to the user's <a href="#color-schemes">theme settings</a>, it will receive basic user information (<code>ID</code>, <code>name</code>, <code>username</code>, <code>language_code</code>) and a unique identifier for the session, <strong>query_id</strong>, which allows messages on behalf of the user to be sent back to the bot.</p>
|
||||
<p>The bot can call the Bot API method <a href="/bots/api#answerwebappquery">answerWebAppQuery</a> to send an inline message from the user back to the bot and close the Web App. After receiving the message, the bot can continue communicating with the user.</p>
|
||||
<p><strong>Good for:</strong></p>
|
||||
<ul>
|
||||
<li>Fully-fledged web services and integrations of any kind.</li>
|
||||
<li>The use cases are effectively <strong>unlimited</strong>.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#launching-web-apps-from-the-menu-button" id="launching-web-apps-from-the-menu-button" name="launching-web-apps-from-the-menu-button"><i class="anchor-icon"></i></a>Launching Web Apps from the Menu Button</h4>
|
||||
<h4><a class="anchor" name="launching-web-apps-from-the-menu-button" href="#launching-web-apps-from-the-menu-button"><i class="anchor-icon"></i></a>Launching Web Apps from the Menu Button</h4>
|
||||
<blockquote>
|
||||
<p><strong>TL;DR:</strong> Web Apps can be launched from a customized menu button. This simply offers a quicker way to access the app and is otherwise <strong>identical</strong> to <a href="#inline-button-web-apps">launching a Web App from an inline button</a>.</p>
|
||||
</blockquote>
|
||||
<p>By default, chats with bots always show a convenient <strong>menu button</strong> that provides quick access to all listed <a href="/bots#commands">commands</a>. With <a href="https://core.telegram.org/bots/api-changelog#april-16-2022">Bot API 6.0</a>, this button can be used to <strong>launch a Web App</strong> instead.</p>
|
||||
<div class="blog_video_player_wrap" style="max-width: 600px; margin: 20px auto 20px;">
|
||||
<video class="blog_video_player tl_blog_vid_autoplay" onclick="videoTogglePlay(this)" autoplay loop controls muted poster="/file/464001829/12247/e6LoU12o4Ng.109921/1226afb8f18f8ea8c4
|
||||
<video class="blog_video_player tl_blog_vid_autoplay" onclick="videoTogglePlay(this)" autoplay loop controls muted poster="/file/464001829/12247/e6LoU12o4Ng.109921/1226afb8f18f8ea8c4
|
||||
" style="max-width: 600px;" title="" alt="Menu Button">
|
||||
<source src="/file/464001838/10fa2/WrJmkuIMan0.1217917.mp4/e25a5f31bc4e6493f7" type="video/mp4">
|
||||
</source></video>
|
||||
</video>
|
||||
</div>
|
||||
|
||||
<p>To configure the menu button, you must specify the text it should show and the Web App URL. There are two ways to set these parameters:</p>
|
||||
<ul>
|
||||
<li>To customize the button for <strong>all users</strong>, use <a href="https://t.me/botfather">@BotFather</a> (the <code>/setmenubutton</code> command or <em>Bot Settings > Menu Button</em>).</li>
|
||||
<li>To customize the button for both <strong>all users</strong> and <strong>specific users</strong>, use the <a href="/bots/api#setchatmenubutton">setChatMenuButton</a> method in the Bot API. For example, change the button text according to the user's language, or show links to different Web Apps based on a user's settings in your bot.</li>
|
||||
<li>To customize the button for both <strong>all users</strong> and <strong>specific users</strong>, use the <a href="/bots/api#setchatmenubutton">setChatMenuButton</a> method in the Bot API. For example, change the button text according to the user's language, or show links to different Web Apps based on a user's settings in your bot.</li>
|
||||
</ul>
|
||||
<p>Apart from this, Web Apps opened via the menu button work in the exact same way as when <a href="#inline-button-web-apps">using inline buttons</a>.</p>
|
||||
<blockquote>
|
||||
<p><a href="https://t.me/durgerkingbot">@DurgerKingBot</a> allows launching its Web App both from an inline button and from the menu button.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" href="#launching-web-apps-from-the-attachment-menu" id="launching-web-apps-from-the-attachment-menu" name="launching-web-apps-from-the-attachment-menu"><i class="anchor-icon"></i></a>Launching Web Apps from the Attachment Menu</h4>
|
||||
<h4><a class="anchor" name="inline-mode-web-apps" href="#inline-mode-web-apps"><i class="anchor-icon"></i></a>Inline Mode Web Apps</h4>
|
||||
<blockquote>
|
||||
<p><strong>TL;DR:</strong> Web App Bots can request to be added directly to a user's attachment menu, allowing them to be quickly launched from any chat. To try this mode, open this <a href="https://t.me/durgerkingbot?startattach">attachment menu link</a> for <em>@DurgerKingBot</em>, then use the <img src="/file/464001085/2/E4hNXSNQimQ.2503/bf6ffcab3cb3afd43d" alt="Attach"> menu in <strong>any type of chat</strong>.</p>
|
||||
<p><strong>TL;DR:</strong> Web Apps launched via <strong>web_app</strong> type <a href="/bots/api#inlinequeryresultsbutton">InlineQueryResultsButton</a> can be used anywhere in inline mode. Users can create content in a web interface and then seamlessly send it to the current chat via inline mode.</p>
|
||||
</blockquote>
|
||||
<p>Web App Bots can request to be added directly to a user's attachment menu, allowing them to be quickly launched from <strong>any type of chat</strong>. You can configure in which types of chats your web app can be started from the attachment menu (private, groups, supergroups or channels).</p>
|
||||
<p>Attachment menu integration is currently only available for major advertisers on the <a href="https://promote.telegram.org/basics">Telegram Ad Platform</a>. However, <strong>all bots</strong> can use it in the <a href="#using-bots-in-the-test-environment">test server environment</a>.</p>
|
||||
<p>To enable this feature for your bot, open <a href="https://t.me/botfather">@BotFather</a> <a href="#using-bots-in-the-test-environment">from an account on the test server</a> and send the <code>/setattach</code> command – or go to <em>Bot Settings > Configure Attachment Menu</em>. Then specify the URL that will be opened to launch the bot's Web App via its icon in the attachment menu.</p>
|
||||
<p>You can add a 'Settings' item to the context menu of your Web App using <a href="https://t.me/botfather">@BotFather</a>. When users select this option from the menu, your bot will receive a <code>settingsButtonClicked</code> event.</p>
|
||||
<p>In addition to the user's <a href="#color-schemes">theme settings</a>, the bot will receive basic user information (<code>ID</code>, <code>name</code>, <code>username</code>, <code>language_code</code>, <code>photo</code>), as well as public info about the chat partner (<code>ID</code>, <code>name</code>, <code>username</code>, <code>photo</code>) or the chat info (<code>ID</code>, <code>type</code>, <code>title</code>, <code>username</code>, <code>photo</code>) and a unique identifier for the web view session <strong>query_id</strong>, which allows messages of any type to be sent to the chat on behalf of the user that opened the bot.</p>
|
||||
<p><sup><mark>NEW</mark></sup> You can use the <em>button</em> parameter in the <a href="/bots/api#answerinlinequery">answerInlineQuery</a> method to display a special 'Switch to Web App' button either above or in place of the inline results. This button will <strong>open a Web App</strong> from the specified URL. Once done, you can call the <a href="#initializing-web-apps">Telegram.WebApp.switchInlineQuery</a> method to send the user back to inline mode.</p>
|
||||
<p>Inline Web Apps have <strong>no access</strong> to the chat – they can't read messages or send new ones on behalf of the user. To send messages, the user must be redirected to <strong>inline mode</strong> and actively pick a result.</p>
|
||||
<p><strong>Good for:</strong></p>
|
||||
<ul>
|
||||
<li>Fully-fledged web services and integrations in inline mode.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" name="direct-link-web-apps" href="#direct-link-web-apps"><i class="anchor-icon"></i></a>Direct Link Web Apps</h4>
|
||||
<blockquote>
|
||||
<p><strong>TL;DR:</strong> Web App Bots can be launched from a direct link in any chat. They support a <em>startapp</em> parameter and are aware of the current chat context.</p>
|
||||
</blockquote>
|
||||
<p><sup><mark>NEW</mark></sup> You can use direct links to <strong>open a Web App</strong> directly in the current chat. If a non-empty <em>startapp</em> parameter is included in the link, it will be passed to the Web App in the <em>start_param</em> field and in the GET parameter <em>tgWebAppStartParam</em>.</p>
|
||||
<p>In this mode, Web Apps can use the <em>chat_type</em> and <em>chat_instance</em> parameters to keep track of the current chat context. This introduces support for <strong>concurrent</strong> and <strong>shared</strong> usage by multiple chat members – to create live whiteboards, group orders, multiplayer games and similar apps.</p>
|
||||
<p>Web Apps opened from a direct link have <strong>no access</strong> to the chat – they can't read messages or send new ones on behalf of the user. To send messages, the user must be redirected to <strong>inline mode</strong> and actively pick a result.</p>
|
||||
<p><strong>Examples</strong></p>
|
||||
<p><code>https://t.me/botusername/appname</code><br><code>https://t.me/botusername/appname?startapp=command</code></p>
|
||||
<p><strong>Good for:</strong></p>
|
||||
<ul>
|
||||
<li>Fully-fledged web services and integrations that any user can open in one tap.</li>
|
||||
<li>Cooperative, multiplayer or teamwork-oriented services within a chat context.</li>
|
||||
<li>The use cases are effectively <strong>unlimited</strong>.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" name="launching-web-apps-from-the-attachment-menu" href="#launching-web-apps-from-the-attachment-menu"><i class="anchor-icon"></i></a>Launching Web Apps from the Attachment Menu</h4>
|
||||
<blockquote>
|
||||
<p><strong>TL;DR:</strong> Web App Bots can request to be added directly to a user's attachment menu, allowing them to be quickly launched from any chat. To try this mode, open this <a href="https://t.me/durgerkingbot?startattach">attachment menu link</a> for <em>@DurgerKingBot</em>, then use the <img class="icon" src="/file/464001085/2/E4hNXSNQimQ.2503/bf6ffcab3cb3afd43d" alt="Attach"> menu in <strong>any type of chat</strong>.</p>
|
||||
</blockquote>
|
||||
<p>Web App Bots can request to be added directly to a user's attachment menu, allowing them to be quickly launched from <strong>any type of chat</strong>. You can configure in which types of chats your web app can be started from the attachment menu (private, groups, supergroups or channels).</p>
|
||||
<p>Attachment menu integration is currently only available for major advertisers on the <a href="https://promote.telegram.org/basics">Telegram Ad Platform</a>. However, <strong>all bots</strong> can use it in the <a href="#using-bots-in-the-test-environment">test server environment</a>.</p>
|
||||
<p>To enable this feature for your bot, open <a href="https://t.me/botfather">@BotFather</a> <a href="#using-bots-in-the-test-environment">from an account on the test server</a> and send the <code>/setattach</code> command – or go to <em>Bot Settings > Configure Attachment Menu</em>. Then specify the URL that will be opened to launch the bot's Web App via its icon in the attachment menu.</p>
|
||||
<p>You can add a 'Settings' item to the context menu of your Web App using <a href="https://t.me/botfather">@BotFather</a>. When users select this option from the menu, your bot will receive a <code>settingsButtonClicked</code> event.</p>
|
||||
<p>In addition to the user's <a href="#color-schemes">theme settings</a>, the bot will receive basic user information (<code>ID</code>, <code>name</code>, <code>username</code>, <code>language_code</code>, <code>photo</code>), as well as public info about the chat partner (<code>ID</code>, <code>name</code>, <code>username</code>, <code>photo</code>) or the chat info (<code>ID</code>, <code>type</code>, <code>title</code>, <code>username</code>, <code>photo</code>) and a unique identifier for the web view session <strong>query_id</strong>, which allows messages of any type to be sent to the chat on behalf of the user that opened the bot.</p>
|
||||
<p>The bot can call the Bot API method <a href="/bots/api#answerwebappquery">answerWebAppQuery</a>, which sends an inline message from the user via the bot to the chat where it was launched and closes the Web App.</p>
|
||||
<blockquote>
|
||||
<p>You can read more about adding bots to the attachment menu <a href="#adding-bots-to-the-attachment-menu">here</a>.</p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<h3><a class="anchor" href="#initializing-web-apps" id="initializing-web-apps" name="initializing-web-apps"><i class="anchor-icon"></i></a>Initializing Web Apps</h3>
|
||||
<h3><a class="anchor" name="initializing-web-apps" href="#initializing-web-apps"><i class="anchor-icon"></i></a>Initializing Web Apps</h3>
|
||||
<p>To connect your Web App to the Telegram client, place the script <a href="https://telegram.org/js/telegram-web-app.js">telegram-web-app.js</a> in the <code><head></code> tag before any other scripts, using this code:</p>
|
||||
<pre><code><script src="https://telegram.org/js/telegram-web-app.js"></script></code></pre>
|
||||
<pre><code><script src="https://telegram.org/js/telegram-web-app.js"></script></code></pre>
|
||||
<p>Once the script is connected, a <code>window.Telegram.WebApp</code> object will become available with the following fields:</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
|
@ -181,27 +216,27 @@
|
|||
<tr>
|
||||
<td>initData</td>
|
||||
<td>String</td>
|
||||
<td>A string with raw data transferred to the Web App, convenient for <a href="#validating-data-received-via-the-web-app">validating data</a>.<br><strong>WARNING:</strong> <a href="#validating-data-received-via-the-web-app">Validate data</a> from this field before using it on the bot's server.</td>
|
||||
<td>A string with raw data transferred to the Web App, convenient for <a href="#validating-data-received-via-the-web-app">validating data</a>.<br><strong>WARNING:</strong> <a href="#validating-data-received-via-the-web-app">Validate data</a> from this field before using it on the bot's server.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>initDataUnsafe</td>
|
||||
<td><a href="#webappinitdata">WebAppInitData</a></td>
|
||||
<td>An object with input data transferred to the Web App.<br><strong>WARNING:</strong> Data from this field should not be trusted. You should only use data from <em>initData</em> on the bot's server and only after it has been <a href="#validating-data-received-via-the-web-app">validated</a>.</td>
|
||||
<td>An object with input data transferred to the Web App.<br><strong>WARNING:</strong> Data from this field should not be trusted. You should only use data from <em>initData</em> on the bot's server and only after it has been <a href="#validating-data-received-via-the-web-app">validated</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>version</td>
|
||||
<td>String</td>
|
||||
<td>The version of the Bot API available in the user's Telegram app.</td>
|
||||
<td>The version of the Bot API available in the user's Telegram app.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>platform ^==NEW==^</td>
|
||||
<td>platform</td>
|
||||
<td>String</td>
|
||||
<td>The name of the platform of the user's Telegram app.</td>
|
||||
<td>The name of the platform of the user's Telegram app.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>colorScheme</td>
|
||||
<td>String</td>
|
||||
<td>The color scheme currently used in the Telegram app. Either “light” or “dark”. <br>Also available as the CSS variable <code>var(--tg-color-scheme)</code>.</td>
|
||||
<td>The color scheme currently used in the Telegram app. Either “light” or “dark”.<br>Also available as the CSS variable <code>var(--tg-color-scheme)</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>themeParams</td>
|
||||
|
@ -216,12 +251,12 @@
|
|||
<tr>
|
||||
<td>viewportHeight</td>
|
||||
<td>Float</td>
|
||||
<td>The current height of the visible area of the Web App. Also available in CSS as the variable <code>var(--tg-viewport-height)</code>. <br><br>The application can display just the top part of the Web App, with its lower part remaining outside the screen area. From this position, the user can "pull" the Web App to its maximum height, while the bot can do the same by calling the <strong>expand()</strong> method. As the position of the Web App changes, the current height value of the visible area will be updated in real time.<br><br>Please note that the refresh rate of this value is not sufficient to smoothly follow the lower border of the window. It should not be used to pin interface elements to the bottom of the visible area. It's more appropriate to use the value of the <code>viewportStableHeight</code> field for this purpose.</td>
|
||||
<td>The current height of the visible area of the Web App. Also available in CSS as the variable <code>var(--tg-viewport-height)</code>.<br><br>The application can display just the top part of the Web App, with its lower part remaining outside the screen area. From this position, the user can “pull” the Web App to its maximum height, while the bot can do the same by calling the <strong>expand()</strong> method. As the position of the Web App changes, the current height value of the visible area will be updated in real time.<br><br>Please note that the refresh rate of this value is not sufficient to smoothly follow the lower border of the window. It should not be used to pin interface elements to the bottom of the visible area. It's more appropriate to use the value of the <code>viewportStableHeight</code> field for this purpose.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>viewportStableHeight</td>
|
||||
<td>Float</td>
|
||||
<td>The height of the visible area of the Web App in its last stable state. Also available in CSS as a variable <code>var(--tg-viewport-stable-height)</code>.<br><br>The application can display just the top part of the Web App, with its lower part remaining outside the screen area. From this position, the user can "pull" the Web App to its maximum height, while the bot can do the same by calling the <strong>expand()</strong> method. Unlike the value of <code>viewportHeight</code>, the value of <code>viewportStableHeight</code> does not change as the position of the Web App changes with user gestures or during animations. The value of <code>viewportStableHeight</code> will be updated after all gestures and animations are completed and the Web App reaches its final size.<br><br><em>Note the <a href="#events-available-for-web-apps">event</a> <code>viewportChanged</code> with the passed parameter <code>isStateStable=true</code>, which will allow you to track when the stable state of the height of the visible area changes.</em></td>
|
||||
<td>The height of the visible area of the Web App in its last stable state. Also available in CSS as a variable <code>var(--tg-viewport-stable-height)</code>.<br><br>The application can display just the top part of the Web App, with its lower part remaining outside the screen area. From this position, the user can “pull” the Web App to its maximum height, while the bot can do the same by calling the <strong>expand()</strong> method. Unlike the value of <code>viewportHeight</code>, the value of <code>viewportStableHeight</code> does not change as the position of the Web App changes with user gestures or during animations. The value of <code>viewportStableHeight</code> will be updated after all gestures and animations are completed and the Web App reaches its final size.<br><br><em>Note the <a href="#events-available-for-web-apps">event</a> <code>viewportChanged</code> with the passed parameter <code>isStateStable=true</code>, which will allow you to track when the stable state of the height of the visible area changes.</em></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>headerColor</td>
|
||||
|
@ -256,27 +291,27 @@
|
|||
<tr>
|
||||
<td>isVersionAtLeast(version)</td>
|
||||
<td>Function</td>
|
||||
<td>Returns true if the user's app supports a version of the Bot API that is equal to or higher than the version passed as the parameter.</td>
|
||||
<td>Returns true if the user's app supports a version of the Bot API that is equal to or higher than the version passed as the parameter.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>setHeaderColor(color)</td>
|
||||
<td>Function</td>
|
||||
<td>==Bot API 6.1+== A method that sets the app header color. You can only pass <em>Telegram.WebApp.themeParams.bg_color</em> or <em>Telegram.WebApp.themeParams.secondary_bg_color</em> as a color or you can use keywords <em>bg_color</em>, <em>secondary_bg_color</em> instead.</td>
|
||||
<td><mark>Bot API 6.1+</mark> A method that sets the app header color. You can only pass <em>Telegram.WebApp.themeParams.bg_color</em> or <em>Telegram.WebApp.themeParams.secondary_bg_color</em> as a color or you can use keywords <em>bg_color</em>, <em>secondary_bg_color</em> instead.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>setBackgroundColor(color)</td>
|
||||
<td>Function</td>
|
||||
<td>==Bot API 6.1+== A method that sets the app background color in the <code>#RRGGBB</code> format or you can use keywords <em>bg_color</em>, <em>secondary_bg_color</em> instead.</td>
|
||||
<td><mark>Bot API 6.1+</mark> A method that sets the app background color in the <code>#RRGGBB</code> format or you can use keywords <em>bg_color</em>, <em>secondary_bg_color</em> instead.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>enableClosingConfirmation()</td>
|
||||
<td>Function</td>
|
||||
<td>==Bot API 6.2+== A method that enables a confirmation dialog while the user is trying to close the Web App.</td>
|
||||
<td><mark>Bot API 6.2+</mark> A method that enables a confirmation dialog while the user is trying to close the Web App.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>disableClosingConfirmation()</td>
|
||||
<td>Function</td>
|
||||
<td>==Bot API 6.2+== A method that disables the confirmation dialog while the user is trying to close the Web App.</td>
|
||||
<td><mark>Bot API 6.2+</mark> A method that disables the confirmation dialog while the user is trying to close the Web App.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>onEvent(eventType, eventHandler)</td>
|
||||
|
@ -294,9 +329,14 @@
|
|||
<td>A method used to send data to the bot. When this method is called, a service message is sent to the bot containing the data <em>data</em> of the length up to 4096 bytes, and the Web App is closed. See the field <em>web_app_data</em> in the class <a href="/bots/api#message">Message</a>.<br><br><em>This method is only available for Web Apps launched via a <a href="#keyboard-button-web-apps">Keyboard button</a>.</em></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>switchInlineQuery(query[, choose_chat_types]) <sup><mark>NEW</mark></sup></td>
|
||||
<td>Function</td>
|
||||
<td><mark>Bot API 6.7+</mark> A method that inserts the bot's username and the specified inline <em>query</em> in the current chat's input field. Query may be empty, in which case only the bot's username will be inserted. If an optional <em>choose_chat_types</em> parameter was passed, the client prompts the user to choose a specific chat, then opens that chat and inserts the bot's username and the specified inline query in the input field. You can specify which types of chats the user will be able to choose from. It can be one or more of the following types: <em>users</em>, <em>bots</em>, <em>groups</em>, <em>channels</em>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>openLink(url[, options])</td>
|
||||
<td>Function</td>
|
||||
<td>A method that opens a link in an external browser. The Web App will <em>not</em> be closed. <br>==Bot API 6.4+== If the optional <em>options</em> parameter is passed with the field <em>try_instant_view=true</em>, the link will be opened in <a href="https://instantview.telegram.org/">Instant View</a> mode if possible. <br><br><em>Note that this method can be called only in response to user interaction with the Web App interface (e.g. a click inside the Web App or on the main button)</em></td>
|
||||
<td>A method that opens a link in an external browser. The Web App will <em>not</em> be closed.<br><mark>Bot API 6.4+</mark> If the optional <em>options</em> parameter is passed with the field <em>try_instant_view=true</em>, the link will be opened in <a href="https://instantview.telegram.org/">Instant View</a> mode if possible.<br><br><em>Note that this method can be called only in response to user interaction with the Web App interface (e.g. a click inside the Web App or on the main button)</em></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>openTelegramLink(url)</td>
|
||||
|
@ -306,42 +346,42 @@
|
|||
<tr>
|
||||
<td>openInvoice(url[, callback])</td>
|
||||
<td>Function</td>
|
||||
<td>==Bot API 6.1+== A method that opens an invoice using the link <em>url</em>. The Web App will receive the <a href="#events-available-for-web-apps">event</a> <em>invoiceClosed</em> when the invoice is closed. If an optional <em>callback</em> parameter was passed, the <em>callback</em> function will be called and the invoice status will be passed as the first argument.</td>
|
||||
<td><mark>Bot API 6.1+</mark> A method that opens an invoice using the link <em>url</em>. The Web App will receive the <a href="#events-available-for-web-apps">event</a> <em>invoiceClosed</em> when the invoice is closed. If an optional <em>callback</em> parameter was passed, the <em>callback</em> function will be called and the invoice status will be passed as the first argument.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>showPopup(params[, callback])</td>
|
||||
<td>Function</td>
|
||||
<td>==Bot API 6.2+== A method that shows a native popup described by the <em>params</em> argument of the type <a href="#popupparams">PopupParams</a>. The Web App will receive the <a href="#events-available-for-web-apps">event</a> <em>popupClosed</em> when the popup is closed. If an optional <em>callback</em> parameter was passed, the <em>callback</em> function will be called and the field <em>id</em> of the pressed button will be passed as the first argument.</td>
|
||||
<td><mark>Bot API 6.2+</mark> A method that shows a native popup described by the <em>params</em> argument of the type <a href="#popupparams">PopupParams</a>. The Web App will receive the <a href="#events-available-for-web-apps">event</a> <em>popupClosed</em> when the popup is closed. If an optional <em>callback</em> parameter was passed, the <em>callback</em> function will be called and the field <em>id</em> of the pressed button will be passed as the first argument.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>showAlert(message[, callback])</td>
|
||||
<td>Function</td>
|
||||
<td>==Bot API 6.2+== A method that shows <em>message</em> in a simple alert with a 'Close' button. If an optional <em>callback</em> parameter was passed, the <em>callback</em> function will be called when the popup is closed.</td>
|
||||
<td><mark>Bot API 6.2+</mark> A method that shows <em>message</em> in a simple alert with a 'Close' button. If an optional <em>callback</em> parameter was passed, the <em>callback</em> function will be called when the popup is closed.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>showConfirm(message[, callback])</td>
|
||||
<td>Function</td>
|
||||
<td>==Bot API 6.2+== A method that shows <em>message</em> in a simple confirmation window with 'OK' and 'Cancel' buttons. If an optional <em>callback</em> parameter was passed, the <em>callback</em> function will be called when the popup is closed and the first argument will be a boolean indicating whether the user pressed the 'OK' button.</td>
|
||||
<td><mark>Bot API 6.2+</mark> A method that shows <em>message</em> in a simple confirmation window with 'OK' and 'Cancel' buttons. If an optional <em>callback</em> parameter was passed, the <em>callback</em> function will be called when the popup is closed and the first argument will be a boolean indicating whether the user pressed the 'OK' button.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>showScanQrPopup(params[, callback]) ^==NEW==^</td>
|
||||
<td>showScanQrPopup(params[, callback])</td>
|
||||
<td>Function</td>
|
||||
<td>==Bot API 6.4+== A method that shows a native popup for scanning a QR code described by the <em>params</em> argument of the type <a href="#scanqrpopupparams">ScanQrPopupParams</a>. The Web App will receive the <a href="#events-available-for-web-apps">event</a> <em>qrTextReceived</em> every time the scanner catches a code with text data. If an optional <em>callback</em> parameter was passed, the <em>callback</em> function will be called and the text from the QR code will be passed as the first argument. Returning <em>true</em> inside this callback function causes the popup to be closed.</td>
|
||||
<td><mark>Bot API 6.4+</mark> A method that shows a native popup for scanning a QR code described by the <em>params</em> argument of the type <a href="#scanqrpopupparams">ScanQrPopupParams</a>. The Web App will receive the <a href="#events-available-for-web-apps">event</a> <em>qrTextReceived</em> every time the scanner catches a code with text data. If an optional <em>callback</em> parameter was passed, the <em>callback</em> function will be called and the text from the QR code will be passed as the first argument. Returning <em>true</em> inside this callback function causes the popup to be closed.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>closeScanQrPopup() ^==NEW==^</td>
|
||||
<td>closeScanQrPopup()</td>
|
||||
<td>Function</td>
|
||||
<td>==Bot API 6.4+== A method that closes the native popup for scanning a QR code opened with the <em>showScanQrPopup</em> method. Run it if you received valid data in the <a href="#events-available-for-web-apps">event</a> <em>qrTextReceived</em>.</td>
|
||||
<td><mark>Bot API 6.4+</mark> A method that closes the native popup for scanning a QR code opened with the <em>showScanQrPopup</em> method. Run it if you received valid data in the <a href="#events-available-for-web-apps">event</a> <em>qrTextReceived</em>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>readTextFromClipboard([callback]) ^==NEW==^</td>
|
||||
<td>readTextFromClipboard([callback])</td>
|
||||
<td>Function</td>
|
||||
<td>==Bot API 6.4+== A method that requests text from the clipboard. The Web App will receive the <a href="#events-available-for-web-apps">event</a> <em>clipboardTextReceived</em>. If an optional <em>callback</em> parameter was passed, the <em>callback</em> function will be called and the text from the clipboard will be passed as the first argument.<br><br><em>Note: this method can be called only for Web Apps launched from the attachment menu and only in response to a user interaction with the Web App interface (e.g. a click inside the Web App or on the main button).</em></td>
|
||||
<td><mark>Bot API 6.4+</mark> A method that requests text from the clipboard. The Web App will receive the <a href="#events-available-for-web-apps">event</a> <em>clipboardTextReceived</em>. If an optional <em>callback</em> parameter was passed, the <em>callback</em> function will be called and the text from the clipboard will be passed as the first argument.<br><br><em>Note: this method can be called only for Web Apps launched from the attachment menu and only in response to a user interaction with the Web App interface (e.g. a click inside the Web App or on the main button).</em></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ready()</td>
|
||||
<td>Function</td>
|
||||
<td>A method that informs the Telegram app that the Web App is ready to be displayed. <br>It is recommended to call this method as early as possible, as soon as all essential interface elements are loaded. Once this method is called, the loading placeholder is hidden and the Web App is shown. <br>If the method is not called, the placeholder will be hidden only when the page is fully loaded.</td>
|
||||
<td>A method that informs the Telegram app that the Web App is ready to be displayed.<br>It is recommended to call this method as early as possible, as soon as all essential interface elements are loaded. Once this method is called, the loading placeholder is hidden and the Web App is shown.<br>If the method is not called, the placeholder will be hidden only when the page is fully loaded.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>expand()</td>
|
||||
|
@ -355,8 +395,8 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" href="#themeparams" id="themeparams" name="themeparams"><i class="anchor-icon"></i></a>ThemeParams</h4>
|
||||
<p>Web Apps can <a href="#color-schemes">adjust the appearance</a> of the interface to match the Telegram user's app in real time. This object contains the user's current theme settings:</p>
|
||||
<h4><a class="anchor" name="themeparams" href="#themeparams"><i class="anchor-icon"></i></a>ThemeParams</h4>
|
||||
<p>Web Apps can <a href="#color-schemes">adjust the appearance</a> of the interface to match the Telegram user's app in real time. This object contains the user's current theme settings:</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -369,44 +409,45 @@
|
|||
<tr>
|
||||
<td>bg_color</td>
|
||||
<td>String</td>
|
||||
<td><em>Optional</em>. Background color in the <code>#RRGGBB</code> format. <br>Also available as the CSS variable <code>var(--tg-theme-bg-color)</code>.</td>
|
||||
<td><em>Optional</em>. Background color in the <code>#RRGGBB</code> format.<br>Also available as the CSS variable <code>var(--tg-theme-bg-color)</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>text_color</td>
|
||||
<td>String</td>
|
||||
<td><em>Optional</em>. Main text color in the <code>#RRGGBB</code> format. <br>Also available as the CSS variable <code>var(--tg-theme-text-color)</code>.</td>
|
||||
<td><em>Optional</em>. Main text color in the <code>#RRGGBB</code> format.<br>Also available as the CSS variable <code>var(--tg-theme-text-color)</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>hint_color</td>
|
||||
<td>String</td>
|
||||
<td><em>Optional</em>. Hint text color in the <code>#RRGGBB</code> format. <br>Also available as the CSS variable <code>var(--tg-theme-hint-color)</code>.</td>
|
||||
<td><em>Optional</em>. Hint text color in the <code>#RRGGBB</code> format.<br>Also available as the CSS variable <code>var(--tg-theme-hint-color)</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>link_color</td>
|
||||
<td>String</td>
|
||||
<td><em>Optional</em>. Link color in the <code>#RRGGBB</code> format. <br>Also available as the CSS variable <code>var(--tg-theme-link-color)</code>.</td>
|
||||
<td><em>Optional</em>. Link color in the <code>#RRGGBB</code> format.<br>Also available as the CSS variable <code>var(--tg-theme-link-color)</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>button_color</td>
|
||||
<td>String</td>
|
||||
<td><em>Optional</em>. Button color in the <code>#RRGGBB</code> format. <br>Also available as the CSS variable <code>var(--tg-theme-button-color)</code>.</td>
|
||||
<td><em>Optional</em>. Button color in the <code>#RRGGBB</code> format.<br>Also available as the CSS variable <code>var(--tg-theme-button-color)</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>button_text_color</td>
|
||||
<td>String</td>
|
||||
<td><em>Optional</em>. Button text color in the <code>#RRGGBB</code> format. <br>Also available as the CSS variable <code>var(--tg-theme-button-text-color)</code>.</td>
|
||||
<td><em>Optional</em>. Button text color in the <code>#RRGGBB</code> format.<br>Also available as the CSS variable <code>var(--tg-theme-button-text-color)</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>secondary_bg_color</td>
|
||||
<td>String</td>
|
||||
<td><em>Optional</em>. ==Bot API 6.1+== Secondary background color in the <code>#RRGGBB</code> format. <br>Also available as the CSS variable <code>var(--tg-theme-secondary-bg-color)</code>.</td>
|
||||
<td><em>Optional</em>. <mark>Bot API 6.1+</mark> Secondary background color in the <code>#RRGGBB</code> format.<br>Also available as the CSS variable <code>var(--tg-theme-secondary-bg-color)</code>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div>
|
||||
<a href="/file/464001695/11185/DAwyUjA7LNA.215601/26f4c8ebf862ae860d" target="_blank"><img src="/file/464001695/11185/DAwyUjA7LNA.215601/26f4c8ebf862ae860d" title="WebViewColors explained" class="dev_page_image"></a>
|
||||
<a href="/file/464001695/11185/DAwyUjA7LNA.215601/26f4c8ebf862ae860d" target="_blank"><img src="/file/464001695/11185/DAwyUjA7LNA.215601/26f4c8ebf862ae860d" title="WebViewColors explained" class="dev_page_image" /></a>
|
||||
</div>
|
||||
<h4><a class="anchor" href="#popupparams" id="popupparams" name="popupparams"><i class="anchor-icon"></i></a>PopupParams</h4>
|
||||
|
||||
<h4><a class="anchor" name="popupparams" href="#popupparams"><i class="anchor-icon"></i></a>PopupParams</h4>
|
||||
<p>This object describes the native popup.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
|
@ -430,12 +471,12 @@
|
|||
<tr>
|
||||
<td>buttons</td>
|
||||
<td>Array of <a href="#popupbutton">PopupButton</a></td>
|
||||
<td><em>Optional</em>. List of buttons to be displayed in the popup, 1-3 buttons. Set to <em>[{"type":"close"}]</em> by default.</td>
|
||||
<td><em>Optional</em>. List of buttons to be displayed in the popup, 1-3 buttons. Set to <em>[{“type”:“close”}]</em> by default.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" href="#scanqrpopupparams" id="scanqrpopupparams" name="scanqrpopupparams"><i class="anchor-icon"></i></a>ScanQrPopupParams</h4>
|
||||
<p>^==NEW==^ This object describes the native popup for scanning QR codes.</p>
|
||||
<h4><a class="anchor" name="scanqrpopupparams" href="#scanqrpopupparams"><i class="anchor-icon"></i></a>ScanQrPopupParams</h4>
|
||||
<p>This object describes the native popup for scanning QR codes.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -448,11 +489,11 @@
|
|||
<tr>
|
||||
<td>text</td>
|
||||
<td>String</td>
|
||||
<td><em>Optional</em>. The text to be displayed under the 'Scan QR' heading, 0-64 characters.</td>
|
||||
<td><em>Optional</em>. The text to be displayed under the 'Scan QR' heading, 0-64 characters.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" href="#popupbutton" id="popupbutton" name="popupbutton"><i class="anchor-icon"></i></a>PopupButton</h4>
|
||||
<h4><a class="anchor" name="popupbutton" href="#popupbutton"><i class="anchor-icon"></i></a>PopupButton</h4>
|
||||
<p>This object describes the native popup button.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
|
@ -466,12 +507,12 @@
|
|||
<tr>
|
||||
<td>id</td>
|
||||
<td>String</td>
|
||||
<td><em>Optional</em>. Identifier of the button, 0-64 characters. Set to empty string by default. <br>If the button is pressed, its <em>id</em> is returned in the callback and the <em>popupClosed</em> event.</td>
|
||||
<td><em>Optional</em>. Identifier of the button, 0-64 characters. Set to empty string by default.<br>If the button is pressed, its <em>id</em> is returned in the callback and the <em>popupClosed</em> event.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>type</td>
|
||||
<td>String</td>
|
||||
<td><em>Optional</em>. Type of the button. Set to <em>default</em> by default. <br>Can be one of these values: <br>- <em>default</em>, a button with the default style, <br>- <em>ok</em>, a button with the localized text "OK", <br>- <em>close</em>, a button with the localized text "Close", <br>- <em>cancel</em>, a button with the localized text "Cancel", <br>- <em>destructive</em>, a button with a style that indicates a destructive action (e.g. "Remove", "Delete", etc.).</td>
|
||||
<td><em>Optional</em>. Type of the button. Set to <em>default</em> by default.<br>Can be one of these values:<br>- <em>default</em>, a button with the default style,<br>- <em>ok</em>, a button with the localized text “OK”,<br>- <em>close</em>, a button with the localized text “Close”,<br>- <em>cancel</em>, a button with the localized text “Cancel”,<br>- <em>destructive</em>, a button with a style that indicates a destructive action (e.g. “Remove”, “Delete”, etc.).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>text</td>
|
||||
|
@ -480,7 +521,7 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" href="#backbutton" id="backbutton" name="backbutton"><i class="anchor-icon"></i></a>BackButton</h4>
|
||||
<h4><a class="anchor" name="backbutton" href="#backbutton"><i class="anchor-icon"></i></a>BackButton</h4>
|
||||
<p>This object controls the <strong>back</strong> button, which can be displayed in the header of the Web App in the Telegram interface.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
|
@ -499,27 +540,27 @@
|
|||
<tr>
|
||||
<td>onClick(callback)</td>
|
||||
<td>Function</td>
|
||||
<td>==Bot API 6.1+== A method that sets the button press event handler. An alias for <code>Telegram.WebApp.onEvent('backButtonClicked', callback)</code></td>
|
||||
<td><mark>Bot API 6.1+</mark> A method that sets the button press event handler. An alias for <code>Telegram.WebApp.onEvent('backButtonClicked', callback)</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>offClick(callback)</td>
|
||||
<td>Function</td>
|
||||
<td>==Bot API 6.1+== A method that removes the button press event handler. An alias for <code>Telegram.WebApp.offEvent('backButtonClicked', callback)</code></td>
|
||||
<td><mark>Bot API 6.1+</mark> A method that removes the button press event handler. An alias for <code>Telegram.WebApp.offEvent('backButtonClicked', callback)</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>show()</td>
|
||||
<td>Function</td>
|
||||
<td>==Bot API 6.1+== A method to make the button active and visible.</td>
|
||||
<td><mark>Bot API 6.1+</mark> A method to make the button active and visible.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>hide()</td>
|
||||
<td>Function</td>
|
||||
<td>==Bot API 6.1+== A method to hide the button.</td>
|
||||
<td><mark>Bot API 6.1+</mark> A method to hide the button.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>All these methods return the BackButton object so they can be chained.</p>
|
||||
<h4><a class="anchor" href="#mainbutton" id="mainbutton" name="mainbutton"><i class="anchor-icon"></i></a>MainButton</h4>
|
||||
<h4><a class="anchor" name="mainbutton" href="#mainbutton"><i class="anchor-icon"></i></a>MainButton</h4>
|
||||
<p>This object controls the main button, which is displayed at the bottom of the Web App in the Telegram interface.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
|
@ -568,17 +609,17 @@
|
|||
<tr>
|
||||
<td>onClick(callback)</td>
|
||||
<td>Function</td>
|
||||
<td>A method that sets the button press event handler. An alias for <code>Telegram.WebApp.onEvent('mainButtonClicked', callback)</code></td>
|
||||
<td>A method that sets the button press event handler. An alias for <code>Telegram.WebApp.onEvent('mainButtonClicked', callback)</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>offClick(callback)</td>
|
||||
<td>Function</td>
|
||||
<td>A method that removes the button press event handler. An alias for <code>Telegram.WebApp.offEvent('mainButtonClicked', callback)</code></td>
|
||||
<td>A method that removes the button press event handler. An alias for <code>Telegram.WebApp.offEvent('mainButtonClicked', callback)</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>show()</td>
|
||||
<td>Function</td>
|
||||
<td>A method to make the button visible. <br><em>Note that opening the Web App from the <a href="#launching-web-apps-from-the-attachment-menu">attachment menu</a> hides the main button until the user interacts with the Web App interface.</em></td>
|
||||
<td>A method to make the button visible.<br><em>Note that opening the Web App from the <a href="#launching-web-apps-from-the-attachment-menu">attachment menu</a> hides the main button until the user interacts with the Web App interface.</em></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>hide()</td>
|
||||
|
@ -598,7 +639,7 @@
|
|||
<tr>
|
||||
<td>showProgress(leaveActive)</td>
|
||||
<td>Function</td>
|
||||
<td>A method to show a loading indicator on the button. <br>It is recommended to display loading progress if the action tied to the button may take a long time. By default, the button is disabled while the action is in progress. If the parameter <code>leaveActive=true</code> is passed, the button remains enabled.</td>
|
||||
<td>A method to show a loading indicator on the button.<br>It is recommended to display loading progress if the action tied to the button may take a long time. By default, the button is disabled while the action is in progress. If the parameter <code>leaveActive=true</code> is passed, the button remains enabled.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>hideProgress()</td>
|
||||
|
@ -608,12 +649,12 @@
|
|||
<tr>
|
||||
<td>setParams(params)</td>
|
||||
<td>Function</td>
|
||||
<td>A method to set the button parameters. The <em>params</em> parameter is an object containing one or several fields that need to be changed: <br><strong>text</strong> - button text; <br><strong>color</strong> - button color; <br><strong>text_color</strong> - button text color; <br><strong>is_active</strong> - enable the button; <br><strong>is_visible</strong> - show the button.</td>
|
||||
<td>A method to set the button parameters. The <em>params</em> parameter is an object containing one or several fields that need to be changed:<br><strong>text</strong> - button text;<br><strong>color</strong> - button color;<br><strong>text_color</strong> - button text color;<br><strong>is_active</strong> - enable the button;<br><strong>is_visible</strong> - show the button.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>All these methods return the MainButton object so they can be chained.</p>
|
||||
<h4><a class="anchor" href="#hapticfeedback" id="hapticfeedback" name="hapticfeedback"><i class="anchor-icon"></i></a>HapticFeedback</h4>
|
||||
<h4><a class="anchor" name="hapticfeedback" href="#hapticfeedback"><i class="anchor-icon"></i></a>HapticFeedback</h4>
|
||||
<p>This object controls haptic feedback.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
|
@ -627,23 +668,23 @@
|
|||
<tr>
|
||||
<td>impactOccurred(style)</td>
|
||||
<td>Function</td>
|
||||
<td>==Bot API 6.1+== A method tells that an impact occurred. The Telegram app may play the appropriate haptics based on style value passed. Style can be one of these values: <br>- <em>light</em>, indicates a collision between small or lightweight UI objects, <br>- <em>medium</em>, indicates a collision between medium-sized or medium-weight UI objects, <br>- <em>heavy</em>, indicates a collision between large or heavyweight UI objects, <br>- <em>rigid</em>, indicates a collision between hard or inflexible UI objects, <br>- <em>soft</em>, indicates a collision between soft or flexible UI objects.</td>
|
||||
<td><mark>Bot API 6.1+</mark> A method tells that an impact occurred. The Telegram app may play the appropriate haptics based on style value passed. Style can be one of these values:<br>- <em>light</em>, indicates a collision between small or lightweight UI objects,<br>- <em>medium</em>, indicates a collision between medium-sized or medium-weight UI objects,<br>- <em>heavy</em>, indicates a collision between large or heavyweight UI objects,<br>- <em>rigid</em>, indicates a collision between hard or inflexible UI objects,<br>- <em>soft</em>, indicates a collision between soft or flexible UI objects.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>notificationOccurred(type)</td>
|
||||
<td>Function</td>
|
||||
<td>==Bot API 6.1+== A method tells that a task or action has succeeded, failed, or produced a warning. The Telegram app may play the appropriate haptics based on type value passed. Type can be one of these values: <br>- <em>error</em>, indicates that a task or action has failed, <br>- <em>success</em>, indicates that a task or action has completed successfully, <br>- <em>warning</em>, indicates that a task or action produced a warning.</td>
|
||||
<td><mark>Bot API 6.1+</mark> A method tells that a task or action has succeeded, failed, or produced a warning. The Telegram app may play the appropriate haptics based on type value passed. Type can be one of these values:<br>- <em>error</em>, indicates that a task or action has failed,<br>- <em>success</em>, indicates that a task or action has completed successfully,<br>- <em>warning</em>, indicates that a task or action produced a warning.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>selectionChanged()</td>
|
||||
<td>Function</td>
|
||||
<td>==Bot API 6.1+== A method tells that the user has changed a selection. The Telegram app may play the appropriate haptics. <br><br><em>Do not use this feedback when the user makes or confirms a selection; use it only when the selection changes.</em></td>
|
||||
<td><mark>Bot API 6.1+</mark> A method tells that the user has changed a selection. The Telegram app may play the appropriate haptics.<br><br><em>Do not use this feedback when the user makes or confirms a selection; use it only when the selection changes.</em></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>All these methods return the HapticFeedback object so they can be chained.</p>
|
||||
<h4><a class="anchor" href="#webappinitdata" id="webappinitdata" name="webappinitdata"><i class="anchor-icon"></i></a>WebAppInitData</h4>
|
||||
<p>This object contains data that is transferred to the Web App when it is opened. It is empty if the Web App was launched from a <a href="#keyboard-button-web-apps">keyboard button</a>.</p>
|
||||
<h4><a class="anchor" name="webappinitdata" href="#webappinitdata"><i class="anchor-icon"></i></a>WebAppInitData</h4>
|
||||
<p>This object contains data that is transferred to the Web App when it is opened. It is empty if the Web App was launched from a <a href="#keyboard-button-web-apps">keyboard button</a> or from <a href="#inline-mode-web-apps">inline mode</a>.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -674,9 +715,19 @@
|
|||
<td><em>Optional.</em> An object containing data about the chat where the bot was launched via the attachment menu. Returned for supergroups, channels and group chats – only for Web Apps launched via the attachment menu.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>chat_type <sup><mark>NEW</mark></sup></td>
|
||||
<td>String</td>
|
||||
<td><em>Optional.</em> Type of the chat from which the Web App was opened. Can be either “sender” for a private chat with the user opening the link, “private”, “group”, “supergroup”, or “channel”. Returned only for Web Apps launched from direct links.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>chat_instance <sup><mark>NEW</mark></sup></td>
|
||||
<td>String</td>
|
||||
<td><em>Optional.</em> Global identifier, uniquely corresponding to the chat from which the Web App was opened. Returned only for Web Apps launched from a direct link.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>start_param</td>
|
||||
<td>String</td>
|
||||
<td><em>Optional.</em> The value of the <em>startattach</em> parameter, passed <a href="#adding-bots-to-the-attachment-menu">via link</a>. Only returned for Web Apps when launched from the attachment menu via link. <br><br>The value of the <code>start_param</code> parameter will also be passed in the GET-parameter <code>tgWebAppStartParam</code>, so the Web App can load the correct interface right away.</td>
|
||||
<td><em>Optional.</em> The value of the <em>startattach</em> parameter, passed <a href="#adding-bots-to-the-attachment-menu">via link</a>. Only returned for Web Apps when launched from the attachment menu via link.<br><br>The value of the <code>start_param</code> parameter will also be passed in the GET-parameter <code>tgWebAppStartParam</code>, so the Web App can load the correct interface right away.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>can_send_after</td>
|
||||
|
@ -695,7 +746,7 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" href="#webappuser" id="webappuser" name="webappuser"><i class="anchor-icon"></i></a>WebAppUser</h4>
|
||||
<h4><a class="anchor" name="webappuser" href="#webappuser"><i class="anchor-icon"></i></a>WebAppUser</h4>
|
||||
<p>This object contains the data of the Web App user.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
|
@ -734,7 +785,7 @@
|
|||
<tr>
|
||||
<td>language_code</td>
|
||||
<td>String</td>
|
||||
<td><em>Optional</em>. <a href="https://en.wikipedia.org/wiki/IETF_language_tag">IETF language tag</a> of the user's language. Returns in <em>user</em> field only.</td>
|
||||
<td><em>Optional</em>. <a href="https://en.wikipedia.org/wiki/IETF_language_tag">IETF language tag</a> of the user's language. Returns in <em>user</em> field only.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>is_premium</td>
|
||||
|
@ -748,7 +799,7 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" href="#webappchat" id="webappchat" name="webappchat"><i class="anchor-icon"></i></a>WebAppChat</h4>
|
||||
<h4><a class="anchor" name="webappchat" href="#webappchat"><i class="anchor-icon"></i></a>WebAppChat</h4>
|
||||
<p>This object represents a chat.</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
|
@ -767,7 +818,7 @@
|
|||
<tr>
|
||||
<td>type</td>
|
||||
<td>String</td>
|
||||
<td>Type of chat, can be either "group", "supergroup" or "channel"</td>
|
||||
<td>Type of chat, can be either “group”, “supergroup” or “channel”</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>title</td>
|
||||
|
@ -786,19 +837,19 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" href="#validating-data-received-via-the-web-app" id="validating-data-received-via-the-web-app" name="validating-data-received-via-the-web-app"><i class="anchor-icon"></i></a>Validating data received via the Web App</h4>
|
||||
<p>To validate data received via the Web App, one should send the data from the <em>Telegram.WebApp.initData</em> field to the bot's backend. The data is a query string, which is composed of a series of field-value pairs.</p>
|
||||
<p>You can verify the integrity of the data received by comparing the received <em>hash</em> parameter with the hexadecimal representation of the <a href="https://en.wikipedia.org/wiki/Hash-based_message_authentication_code">HMAC-SHA-256</a> signature of the <strong>data-check-string</strong> with the secret key, which is the <a href="https://en.wikipedia.org/wiki/Hash-based_message_authentication_code">HMAC-SHA-256</a> signature of the <a href="/bots#how-do-i-create-a-bot">bot's token</a> with the constant string <code>WebAppData</code> used as a key.</p>
|
||||
<p><strong>Data-check-string</strong> is a chain of all received fields, sorted alphabetically, in the format <code>key=<value></code> with a <a href="https://en.wikipedia.org/wiki/Newline">line feed</a> character ('\n', 0x0A) used as separator – e.g., <code>'auth_date=<auth_date>\nquery_id=<query_id>\nuser=<user>'</code>.</p>
|
||||
<h4><a class="anchor" name="validating-data-received-via-the-web-app" href="#validating-data-received-via-the-web-app"><i class="anchor-icon"></i></a>Validating data received via the Web App</h4>
|
||||
<p>To validate data received via the Web App, one should send the data from the <em>Telegram.WebApp.initData</em> field to the bot's backend. The data is a query string, which is composed of a series of field-value pairs.</p>
|
||||
<p>You can verify the integrity of the data received by comparing the received <em>hash</em> parameter with the hexadecimal representation of the <a href="https://en.wikipedia.org/wiki/Hash-based_message_authentication_code">HMAC-SHA-256</a> signature of the <strong>data-check-string</strong> with the secret key, which is the <a href="https://en.wikipedia.org/wiki/Hash-based_message_authentication_code">HMAC-SHA-256</a> signature of the <a href="/bots#creating-a-new-bot">bot's token</a> with the constant string <code>WebAppData</code> used as a key.</p>
|
||||
<p><strong>Data-check-string</strong> is a chain of all received fields, sorted alphabetically, in the format <code>key=<value></code> with a <a href="https://en.wikipedia.org/wiki/Newline">line feed</a> character ('\n', 0x0A) used as separator – e.g., <code>'auth_date=<auth_date>\nquery_id=<query_id>\nuser=<user>'</code>.</p>
|
||||
<p>The full check might look like:</p>
|
||||
<pre><code>data_check_string = ...
|
||||
<a href='/constructor/secret_key'>secret_key</a> = <a href='/type/HMAC_SHA256%28%3Cbot_token%26gt'>HMAC_SHA256(<bot_token></a>;, "WebAppData")
|
||||
secret_key = HMAC_SHA256(<bot_token>, "WebAppData")
|
||||
if (hex(HMAC_SHA256(data_check_string, secret_key)) == hash) {
|
||||
// data is from Telegram
|
||||
// data is from Telegram
|
||||
}</code></pre>
|
||||
<p>To prevent the use of outdated data, you can additionally check the <em>auth_date</em> field, which contains a Unix timestamp of when it was received by the Web App.</p>
|
||||
<p>Once validated, the data may be used on your server. Complex data types are represented as JSON-serialized objects.</p>
|
||||
<h4><a class="anchor" href="#events-available-for-web-apps" id="events-available-for-web-apps" name="events-available-for-web-apps"><i class="anchor-icon"></i></a>Events Available for Web Apps</h4>
|
||||
<h4><a class="anchor" name="events-available-for-web-apps" href="#events-available-for-web-apps"><i class="anchor-icon"></i></a>Events Available for Web Apps</h4>
|
||||
<p>The Web App can receive events from the Telegram app, onto which a handler can be attached using the <code>Telegram.WebApp.onEvent(eventType, eventHandler)</code> method. Inside <code>eventHandler</code> the <em>this</em> object refers to <em>Telegram.WebApp</em>, the set of parameters sent to the handler depends on the event type. Below is a list of possible events:</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
|
@ -810,64 +861,58 @@ if (hex(HMAC_SHA256(data_check_string, secret_key)) == hash) {
|
|||
<tbody>
|
||||
<tr>
|
||||
<td><code>themeChanged</code></td>
|
||||
<td>Occurs whenever theme settings are changed in the user's Telegram app (including switching to night mode). <br><em>eventHandler</em> receives no parameters, new theme settings and color scheme can be received via <em>this.themeParams</em> and <em>this.colorScheme</em> respectively.</td>
|
||||
<td>Occurs whenever theme settings are changed in the user's Telegram app (including switching to night mode).<br><em>eventHandler</em> receives no parameters, new theme settings and color scheme can be received via <em>this.themeParams</em> and <em>this.colorScheme</em> respectively.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>viewportChanged</code></td>
|
||||
<td>Occurs when the visible section of the Web App is changed. <br><em>eventHandler</em> receives an object with the single field <em>isStateStable</em>. If <em>isStateStable</em> is true, the resizing of the Web App is finished. If it is false, the resizing is ongoing (the user is expanding or collapsing the Web App or an animated object is playing). The current value of the visible section’s height is available in <em>this.viewportHeight</em>.</td>
|
||||
<td>Occurs when the visible section of the Web App is changed.<br><em>eventHandler</em> receives an object with the single field <em>isStateStable</em>. If <em>isStateStable</em> is true, the resizing of the Web App is finished. If it is false, the resizing is ongoing (the user is expanding or collapsing the Web App or an animated object is playing). The current value of the visible section’s height is available in <em>this.viewportHeight</em>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>mainButtonClicked</code></td>
|
||||
<td>Occurs when the <a href="#mainbutton">main button</a> is pressed. <br><em>eventHandler</em> receives no parameters.</td>
|
||||
<td>Occurs when the <a href="#mainbutton">main button</a> is pressed.<br><em>eventHandler</em> receives no parameters.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>backButtonClicked</code></td>
|
||||
<td>==Bot API 6.1+== Occurrs when the <a href="#backbutton">back button</a> is pressed. <br><em>eventHandler</em> receives no parameters.</td>
|
||||
<td><mark>Bot API 6.1+</mark> Occurrs when the <a href="#backbutton">back button</a> is pressed.<br><em>eventHandler</em> receives no parameters.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>settingsButtonClicked</code></td>
|
||||
<td>==Bot API 6.1+== Occurrs when the Settings item in context menu is pressed. <br><em>eventHandler</em> receives no parameters.</td>
|
||||
<td><mark>Bot API 6.1+</mark> Occurrs when the Settings item in context menu is pressed.<br><em>eventHandler</em> receives no parameters.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>invoiceClosed</code></td>
|
||||
<td>==Bot API 6.1+== Occurrs when the opened invoice is closed. <br><em>eventHandler</em> receives an object with the two fields: <em>url</em> – invoice link provided and <em>status</em> – one of the invoice statuses: <br>- <strong>paid</strong> – invoice was paid successfully, <br>- <strong>cancelled</strong> – user closed this invoice without paying, <br>- <strong>failed</strong> – user tried to pay, but the payment was failed, <br>- <strong>pending</strong> – the payment is still processing. The bot will receive a service message about a <a href="https://core.telegram.org/bots/api#successfulpayment">successful payment</a> when the payment is successfully paid.</td>
|
||||
<td><mark>Bot API 6.1+</mark> Occurrs when the opened invoice is closed.<br><em>eventHandler</em> receives an object with the two fields: <em>url</em> – invoice link provided and <em>status</em> – one of the invoice statuses:<br>- <strong>paid</strong> – invoice was paid successfully,<br>- <strong>cancelled</strong> – user closed this invoice without paying,<br>- <strong>failed</strong> – user tried to pay, but the payment was failed,<br>- <strong>pending</strong> – the payment is still processing. The bot will receive a service message about a <a href="https://core.telegram.org/bots/api#successfulpayment">successful payment</a> when the payment is successfully paid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>popupClosed</code></td>
|
||||
<td>==Bot API 6.2+== Occurrs when the opened popup is closed. <br><em>eventHandler</em> receives an object with the single field <em>button_id</em> – the value of the field <em>id</em> of the pressed button. If no buttons were pressed, the field <em>button_id</em> will be <em>null</em>.</td>
|
||||
<td><mark>Bot API 6.2+</mark> Occurrs when the opened popup is closed.<br><em>eventHandler</em> receives an object with the single field <em>button_id</em> – the value of the field <em>id</em> of the pressed button. If no buttons were pressed, the field <em>button_id</em> will be <em>null</em>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>qrTextReceived</code> ^==NEW==^</td>
|
||||
<td>==Bot API 6.4+== Occurs when the QR code scanner catches a code with text data. <br><em>eventHandler</em> receives an object with the single field <em>data</em> containing text data from the QR code.</td>
|
||||
<td><code>qrTextReceived</code></td>
|
||||
<td><mark>Bot API 6.4+</mark> Occurs when the QR code scanner catches a code with text data.<br><em>eventHandler</em> receives an object with the single field <em>data</em> containing text data from the QR code.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>clipboardTextReceived</code> ^==NEW==^</td>
|
||||
<td>==Bot API 6.4+== Occurrs when the <code>readTextFromClipboard</code> method is called. <br><em>eventHandler</em> receives an object with the single field <em>data</em> containing text data from the clipboard. If the clipboard contains non-text data, the field <em>data</em> will be an empty string. If the Web App has no access to the clipboard, the field <em>data</em> will be <em>null</em>.</td>
|
||||
<td><code>clipboardTextReceived</code></td>
|
||||
<td><mark>Bot API 6.4+</mark> Occurrs when the <code>readTextFromClipboard</code> method is called.<br><em>eventHandler</em> receives an object with the single field <em>data</em> containing text data from the clipboard. If the clipboard contains non-text data, the field <em>data</em> will be an empty string. If the Web App has no access to the clipboard, the field <em>data</em> will be <em>null</em>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" href="#adding-bots-to-the-attachment-menu" id="adding-bots-to-the-attachment-menu" name="adding-bots-to-the-attachment-menu"><i class="anchor-icon"></i></a>Adding Bots to the Attachment Menu</h4>
|
||||
<p>Attachment menu integration is currently only available for major advertisers on the <a href="https://promote.telegram.org/basics">Telegram Ad Platform</a>. However, <strong>all bots</strong> can use it in the <a href="#using-bots-in-the-test-environment">test server environment</a>. Talk to Botfather on the test server to <a href="#using-bots-in-the-test-environment">set up the integration</a>.</p>
|
||||
<h4><a class="anchor" name="adding-bots-to-the-attachment-menu" href="#adding-bots-to-the-attachment-menu"><i class="anchor-icon"></i></a>Adding Bots to the Attachment Menu</h4>
|
||||
<p>Attachment menu integration is currently only available for major advertisers on the <a href="https://promote.telegram.org/basics">Telegram Ad Platform</a>. However, <strong>all bots</strong> can use it in the <a href="#using-bots-in-the-test-environment">test server environment</a>. Talk to Botfather on the test server to <a href="#using-bots-in-the-test-environment">set up the integration</a>.</p>
|
||||
<p>A special link is used to add bots to the attachment menu:</p>
|
||||
<p><code>https://t.me/botusername?startattach</code>
|
||||
or
|
||||
<code>https://t.me/botusername?startattach=command</code></p>
|
||||
<p><code>https://t.me/botusername?startattach</code><br>or<br><code>https://t.me/botusername?startattach=command</code></p>
|
||||
<blockquote>
|
||||
<p>For example, open this <a href="https://t.me/durgerkingbot?startattach">attachment menu link</a> for <em>@DurgerKingBot</em>, then use the <img src="/file/464001085/2/E4hNXSNQimQ.2503/bf6ffcab3cb3afd43d" alt="Attach"> menu in any <strong>private chat</strong>.</p>
|
||||
<p>For example, open this <a href="https://t.me/durgerkingbot?startattach">attachment menu link</a> for <em>@DurgerKingBot</em>, then use the <img class="icon" src="/file/464001085/2/E4hNXSNQimQ.2503/bf6ffcab3cb3afd43d" alt="Attach"> menu in any <strong>private chat</strong>.</p>
|
||||
</blockquote>
|
||||
<p>Opening the link prompts the user to add the bot to their attachment menu. If the bot has already been added, the attachment menu will open in the current chat and redirect to the bot there (if the link is opened from a 1-on-1 chat). If a non-empty <em>startattach</em> parameter was included in the link, it will be passed to the Web App in the <em>start_param</em> field and in the GET parameter <em>tgWebAppStartParam</em>.</p>
|
||||
<p>The following link formats are also supported:</p>
|
||||
<p><code>https://t.me/username?attach=botusername</code>
|
||||
<code>https://t.me/username?attach=botusername&startattach=command</code>
|
||||
<code>https://t.me/+1234567890?attach=botusername</code>
|
||||
<code>https://t.me/+1234567890?attach=botusername&startattach=command</code></p>
|
||||
<p>These links open the Web App in the attachment menu in the chat with a specific user. If the bot wasn't already added to the attachment menu, the user will be prompted to do so. If a non-empty <em>startattach</em> parameter was included in the link, it will be passed to the Web App in the <em>start_param</em> field and in the GET parameter <em>tgWebAppStartParam</em>.</p>
|
||||
<p>==Bot API 6.1+== supports a new link format:</p>
|
||||
<p><code>https://t.me/botusername?startattach&choose=users+bots</code>
|
||||
<code>https://t.me/botusername?startattach=command&choose=groups+channels</code></p>
|
||||
<p>Opening such a link prompts the user to choose a specific chat and opens the attachment menu in that chat. If the bot wasn't already added to the attachment menu, the user will be prompted to do so. You can specify which types of chats the user will be able to choose from. It can be one or more of the following types: <em>users</em>, <em>bots</em>, <em>groups</em>, <em>channels</em> separated by a <code>+</code> sign. If a non-empty <em>startattach</em> parameter was included in the link, it will be passed to the Web App in the <em>start_param</em> field and in the GET parameter <em>tgWebAppStartParam</em>.</p>
|
||||
<h3><a class="anchor" href="#testing-web-apps" id="testing-web-apps" name="testing-web-apps"><i class="anchor-icon"></i></a>Testing Web Apps</h3>
|
||||
<h4><a class="anchor" href="#using-bots-in-the-test-environment" id="using-bots-in-the-test-environment" name="using-bots-in-the-test-environment"><i class="anchor-icon"></i></a>Using bots in the test environment</h4>
|
||||
<p><code>https://t.me/username?attach=botusername</code><br><code>https://t.me/username?attach=botusername&startattach=command</code><br><code>https://t.me/+1234567890?attach=botusername</code><br><code>https://t.me/+1234567890?attach=botusername&startattach=command</code></p>
|
||||
<p>These links open the Web App in the attachment menu in the chat with a specific user. If the bot wasn't already added to the attachment menu, the user will be prompted to do so. If a non-empty <em>startattach</em> parameter was included in the link, it will be passed to the Web App in the <em>start_param</em> field and in the GET parameter <em>tgWebAppStartParam</em>.</p>
|
||||
<p><mark>Bot API 6.1+</mark> supports a new link format:</p>
|
||||
<p><code>https://t.me/botusername?startattach&choose=users+bots</code><br><code>https://t.me/botusername?startattach=command&choose=groups+channels</code></p>
|
||||
<p>Opening such a link prompts the user to choose a specific chat and opens the attachment menu in that chat. If the bot wasn't already added to the attachment menu, the user will be prompted to do so. You can specify which types of chats the user will be able to choose from. It can be one or more of the following types: <em>users</em>, <em>bots</em>, <em>groups</em>, <em>channels</em> separated by a <code>+</code> sign. If a non-empty <em>startattach</em> parameter was included in the link, it will be passed to the Web App in the <em>start_param</em> field and in the GET parameter <em>tgWebAppStartParam</em>.</p>
|
||||
<h3><a class="anchor" name="testing-web-apps" href="#testing-web-apps"><i class="anchor-icon"></i></a>Testing Web Apps</h3>
|
||||
<h4><a class="anchor" name="using-bots-in-the-test-environment" href="#using-bots-in-the-test-environment"><i class="anchor-icon"></i></a>Using bots in the test environment</h4>
|
||||
<p>To log in to the test environment, use either of the following:</p>
|
||||
<ul>
|
||||
<li><strong>iOS:</strong> tap 10 times on the Settings icon > Accounts > Login to another account > Test.</li>
|
||||
|
@ -880,7 +925,7 @@ or
|
|||
<blockquote>
|
||||
<p><strong>Note:</strong> When working with the test environment, you may use HTTP links without TLS to test your Web App.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" href="#debug-mode-for-web-apps" id="debug-mode-for-web-apps" name="debug-mode-for-web-apps"><i class="anchor-icon"></i></a>Debug Mode for Web Apps</h4>
|
||||
<h4><a class="anchor" name="debug-mode-for-web-apps" href="#debug-mode-for-web-apps"><i class="anchor-icon"></i></a>Debug Mode for Web Apps</h4>
|
||||
<p>Use these tools to find app-specific issues in your Web App:</p>
|
||||
<p><strong>Android</strong></p>
|
||||
<ul>
|
||||
|
@ -898,9 +943,10 @@ or
|
|||
<p><strong>Telegram macOS</strong></p>
|
||||
<ul>
|
||||
<li>Download and launch the <a href="https://telegram.org/dl/macos/beta">Beta Version</a> of Telegram macOS.</li>
|
||||
<li>Quickly click 5 times on the Settings icon to open the debug menu and enable "Debug Web Apps".</li>
|
||||
<li>Quickly click 5 times on the Settings icon to open the debug menu and enable “Debug Web Apps”.</li>
|
||||
<li>Right click in the web app and choose <em>Inspect Element</em>.</li>
|
||||
</ul></div>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -2,12 +2,19 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Fragment</title>
|
||||
<title>How does Fragment work? – Fragment</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<meta name="format-detection" content="telephone=no" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="MobileOptimized" content="176" />
|
||||
<meta name="HandheldFriendly" content="True" />
|
||||
<meta name="HandheldFriendly" content="True" /><meta name="twitter:card" content="summary"></meta>
|
||||
<meta property="og:url" content="https://fragment.com/about" />
|
||||
<meta property="og:title" content="How does Fragment work?">
|
||||
<meta property="og:image" content="https://fragment.com/img/fragment_image.png">
|
||||
<meta property="og:description" content="Learn more about collectible usernames and how to get them.">
|
||||
<meta property="og:site_name" content="Fragment Auctions">
|
||||
<link rel="canonical" href="https://fragment.com/about" />
|
||||
|
||||
<link rel="shortcut icon" href="/img/fragment.ico" type="image/x-icon" />
|
||||
<link rel="mask-icon" href="/img/fragment_icon.svg" color="#121519">
|
||||
<script>document.cookie="stel_dt="+encodeURIComponent((new Date).getTimezoneOffset())+";path=/;max-age=31536000;samesite=None;secure"</script>
|
||||
|
@ -19,20 +26,292 @@
|
|||
|
||||
</head>
|
||||
<body class="emoji_image no-transition">
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" style="display:none">
|
||||
<defs>
|
||||
<path id="icon-premium" d="m8.88 13.45 2.89-5.71c.33-.66 1.14-.93 1.8-.6.25.13.46.35.59.61l2.73 5.51c.22.45.66.76 1.16.82l5.7.68c.78.09 1.33.79 1.24 1.57-.04.31-.18.61-.41.84l-4.52 4.42c-.18.18-.27.43-.23.68l.75 5.98c.1.85-.5 1.63-1.36 1.74-.32.04-.65-.02-.94-.18l-4.77-2.59c-.34-.19-.76-.19-1.11-.01l-4.93 2.52c-.7.35-1.55.07-1.91-.62-.13-.26-.18-.55-.14-.84l.4-2.74c.19-1.34 1.03-2.51 2.23-3.12l5.49-2.78c.15-.08.2-.26.13-.4-.06-.12-.18-.18-.31-.16l-6.71.95c-1.02.15-2.06-.14-2.87-.79l-2.23-1.82c-.64-.51-.73-1.45-.22-2.09.24-.29.59-.48.97-.53l5.73-.74c.36-.04.68-.27.85-.6z"/>
|
||||
</defs>
|
||||
</svg>
|
||||
<div id="aj_progress" class="progress-bar"></div>
|
||||
|
||||
<div id="aj_content"> <main class="tm-unavailable">
|
||||
<div class="tm-logo js-logo js-random-logo js-logo-clickable">
|
||||
<i class="tm-logo-icon js-logo-icon"></i>
|
||||
<div id="aj_content"> <header class="tm-header">
|
||||
<div class="tm-header-logo">
|
||||
<a href="/" class="tm-logo js-header-logo js-logo js-random-logo js-logo-hoverable">
|
||||
<i class="tm-logo-icon js-logo-icon"></i>
|
||||
<i class="tm-logo-text"></i>
|
||||
</a>
|
||||
</div>
|
||||
<h1 class="tm-unavailable-header">
|
||||
Oops
|
||||
</h1>
|
||||
<p class="tm-unavailable-text">
|
||||
This service is not available in the United States.
|
||||
</p>
|
||||
</main></div>
|
||||
<div class="tm-header-body">
|
||||
|
||||
</div>
|
||||
<div class="tm-header-actions tm-header-actions-wide">
|
||||
<button class="btn btn-default tm-header-action tm-header-button login-link">
|
||||
<i class="icon icon-connect-telegram"></i>
|
||||
<span class="tm-button-label">Connect Telegram</span>
|
||||
</button>
|
||||
<button class="btn btn-primary tm-header-action tm-header-button ton-auth-link">
|
||||
<i class="icon icon-connect-ton"></i>
|
||||
<span class="tm-button-label">Connect TON</span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
<div class="tm-header-actions tm-header-actions-thin"> <button class="btn btn-primary tm-header-action tm-header-button ton-auth-link">
|
||||
<i class="icon icon-connect-ton"></i>
|
||||
<span class="tm-button-label">Connect TON</span>
|
||||
</button></div>
|
||||
<div class="tm-header-menu-button js-header-menu-button icon-before icon-header-menu"></div>
|
||||
<div class="tm-header-menu hide js-header-menu" data-close-outside="js-header-menu-window">
|
||||
<div class="tm-header-menu-close-button js-header-menu-close-button icon-before icon-header-menu-close"></div>
|
||||
<div class="tm-header-menu-window js-header-menu-window">
|
||||
|
||||
<div class="tm-header-menu-body">
|
||||
|
||||
<h4 class="tm-menu-subheader">Platform</h4>
|
||||
<div class="tm-menu-links">
|
||||
<a href="/about" class="tm-menu-link icon-before icon-menu-about">About</a>
|
||||
<a href="/terms" class="tm-menu-link icon-before icon-menu-terms">Terms</a>
|
||||
<a href="/privacy" class="tm-menu-link icon-before icon-menu-privacy">Privacy Policy</a>
|
||||
</div>
|
||||
<div class="tm-header-menu-footer">
|
||||
<div class="tm-header-menu-footer-text">
|
||||
Connect TON and Telegram <br/>to view your bids and assets
|
||||
</div>
|
||||
<button class="btn btn-primary btn-block tm-menu-button ton-auth-link">
|
||||
<i class="icon icon-connect-ton"></i>
|
||||
<span class="tm-button-label">Connect TON</span>
|
||||
</button>
|
||||
<button class="btn btn-default btn-block tm-menu-button login-link">
|
||||
<i class="icon icon-connect-telegram"></i>
|
||||
<span class="tm-button-label">Connect Telegram</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<main class="tm-article">
|
||||
<section class="tm-article-content">
|
||||
<div id="dev_page_content_wrap" class=" ">
|
||||
<div class="dev_page_bread_crumbs"></div>
|
||||
<h1 id="dev_page_title">How does Fragment work?</h1>
|
||||
|
||||
<div id="dev_page_content"><p><a href="https://fragment.com">Fragment</a> is a <strong>free platform</strong> which facilitates the transaction of collectibles between users. It supports direct, <strong>secure</strong> and <strong>anonymous</strong> sales as well as <strong>public auctions</strong> where everyone can participate over a period of time. To provide this service transparently, Fragment takes full advantage of <a href="https://en.wikipedia.org/wiki/Telegram_Open_Network">TON</a>, a blockchain technology initially developed by Telegram.</p>
|
||||
<p>If you have used similar platforms before, go ahead and connect your Telegram account and your <a href="https://tonkeeper.com/">TON wallet</a> to <a href="https://fragment.com">Fragment</a>. You can then bid on any available auction, either in the featured list on the <strong>homepage</strong> or via the <strong>search bar</strong> at the top.</p>
|
||||
<p>If you are not familiar with these terms and don't know where to start, simply follow the handy <a href="#what-is-a-collectible">tutorial</a> available below.</p>
|
||||
<h3><a class="anchor-link" href="#what-is-a-collectible"><i class="anchor-icon"></i></a><a class="anchor" name="what-is-a-collectible"></a>What is a Collectible?</h3>
|
||||
<p>A <strong>collectible</strong> is a unique item (e.g. a username, virtual phone number, etc.) that is <strong>permanently recorded</strong> on the public TON blockchain as property owned by the holder of the corresponding address. TON offers a free, distributed and secure interface for developers to integrate collectibles into their platforms.</p>
|
||||
<p>Once you obtain a collectible, it is yours <strong>forever</strong> and you are free to show it off, sell it, or take advantage of the features it unlocks. The unique functionalities tied to collectibles will depend on how each platform chooses to support them.</p>
|
||||
<p>Fragment is integrated with <a href="https://telegram.org">Telegram</a> usernames – giving users the ability to securely acquire and exchange catchy collectible usernames, as well as <a href="#auctioning-basic-usernames">convert existing usernames</a> on Telegram into collectibles. Additionally, Fragment allows users to purchase anonymous numbers that can be used to register a Telegram account without tying it to a SIM card.</p>
|
||||
<p>Other services are free to integrate collectibles to unlock cross-platform, permanent perks for their users.</p>
|
||||
<h4><a class="anchor-link" href="#how-can-i-purchase-collectibles"><i class="anchor-icon"></i></a><a class="anchor" name="how-can-i-purchase-collectibles"></a>How can I purchase collectibles?</h4>
|
||||
<p>You can purchase a collectible on <a href="https://fragment.com">Fragment</a> by exchanging it with a special currency called <strong>Toncoin</strong> – the amount you need will depend on what the current highest bid is, just like any other auction.</p>
|
||||
<p>To use this currency you must first <a href="#creating-a-wallet">create a secure wallet</a> to store it, <a href="#depositing-funds">deposit new funds</a> in it and finally <a href="#connecting-to-fragment-and-telegram">connect it to Fragment</a>.</p>
|
||||
<blockquote>
|
||||
<p>If you're running into any issue while following this tutorial, check out the <a href="#faq">FAQ</a> section below.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor-link" href="#creating-a-wallet"><i class="anchor-icon"></i></a><a class="anchor" name="creating-a-wallet"></a>Creating a Wallet</h4>
|
||||
<p>To create your wallet, simply tap on <a href="https://tonkeeper.com">this link</a> and install the <strong>Tonkeeper</strong> app with one of the available buttons. Once you have installed it, tap on <em>Get Started > Create New Wallet</em> and follow the instructions on the screen.</p>
|
||||
<p>You'll soon be presented with a numbered list of words – this is the equivalent of your <strong>password</strong> and you <strong>must</strong> write it down or store it securely. Failure to do so <strong>will</strong> result in the irreversible loss of your wallet, funds and collectibles.</p>
|
||||
<blockquote>
|
||||
<p>With non-custodial wallets like TonKeeper nobody holds the keys to your funds but you. While this is very secure, it also means that if you lose the keys nobody will be able to help you restore them; be sure to <strong>back up your credentials</strong>.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor-link" href="#depositing-funds"><i class="anchor-icon"></i></a><a class="anchor" name="depositing-funds"></a>Depositing funds</h4>
|
||||
<p>Once your wallet is ready, you'll have to <strong>deposit funds</strong> in it. To deposit existing TON stored somewhere else (e.g. from a friend, family, etc.), scan the <strong>QR code</strong> under the <em>receive</em> button. If you <strong>do not own</strong> any TON, you will need to buy it.</p>
|
||||
<p>A list of reputable platforms which offer this service is available <a href="https://ton.org/buy-toncoin">here</a>; some of them may ask for a form of identification – this is to be expected as you will be exchanging funds.</p>
|
||||
<p>No matter which platform you pick, be sure to insert <strong>your wallet address</strong> when you are prompted for one – if you don't insert the correct wallet address, your funds may be lost. For maximum safety, copy-paste your wallet address directly from the app.</p>
|
||||
<div>
|
||||
<a href="/file/464001873/1197c/lLV6e87nax0.85567/d67faa21c2f662706b" target="_blank"><img src="/file/464001873/1197c/lLV6e87nax0.85567/d67faa21c2f662706b" title="Deposit Funds" class="dev_page_image" width=80% /></a>
|
||||
</div>
|
||||
|
||||
<p><strong>Do not</strong> send funds to the address in the screenshots above – they just provide an example of where to look <strong>in your own wallet</strong> app.</p>
|
||||
<blockquote>
|
||||
<p>Don't panic if your new funds don't appear immediately! Transactions usually happen within seconds, but may sometimes take longer. If you still don't see them after 30 minutes, check out the <a href="#faq">FAQ</a> section below.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor-link" href="#connecting-to-fragment-and-telegram"><i class="anchor-icon"></i></a><a class="anchor" name="connecting-to-fragment-and-telegram"></a>Connecting to Fragment and Telegram</h4>
|
||||
<p>Once your funds show up in your <strong>wallet</strong>, open <a href="https://fragment.com">Fragment</a> and use the button in the top-right corner to <strong>log in</strong>. You will find a Telegram <strong>login widget</strong> where you can enter your phone number in international format. Other users <strong>will not</strong> see your Telegram account or phone number, even if you participate in an auction.</p>
|
||||
<p>After logging in with Telegram, use the <strong>Connect TON</strong> button to <strong>log in with Tonkeeper</strong>. If you're using Fragment from a separate device, simply scan the <strong>QR code</strong> from your Tonkeeper app; if you're using the <strong>same phone</strong>, tap the button right below the QR.</p>
|
||||
<blockquote>
|
||||
<p>Remember that the Tonkeeper app has a built-in QR scanner in the top-right corner of the screen.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor-link" href="#bidding-ton"><i class="anchor-icon"></i></a><a class="anchor" name="bidding-ton"></a>Bidding TON</h4>
|
||||
<p>After connecting to Fragment you're all set and ready to bid on <strong>any available collectible</strong>. To do so, tap on one of the available auctions, enter an amount, confirm it and pay via Tonkeeper – just like you did when you were logging in.</p>
|
||||
<p>During bidding, whoever’s bid is first to the blockchain will get the bid at that price. If your bid wasn’t reflected in the blockchain before the auction ends, you will get the money back and lose the bid. Your money will also be returned if somebody else outbids you.</p>
|
||||
<blockquote>
|
||||
<p>Usernames listed as <em>Taken</em> are currently in use and not available for sale. However, you can pay a <strong>small fee</strong> to <a href="#why-is-the-collectible-i-want-marked-as-unavailable">notify their owner</a> that you are interested in acquiring the name. To do so, search for the username on Fragment, open its page and tap on '<em>Make an offer</em>'.</p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<h2><a class="anchor-link" href="#putting-collectibles-up-for-auction"><i class="anchor-icon"></i></a><a class="anchor" name="putting-collectibles-up-for-auction"></a>Putting Collectibles Up For Auction</h2>
|
||||
<p>If you own a collectible, you are free to either sell it directly or auction it to the public at any time. To do so, tap on <a href="/my/assets">My Assets</a> and select either <em>Put up for auction</em> or <em>Sell</em> depending on what you want to do.</p>
|
||||
<blockquote>
|
||||
<p>If you decide to auction one of your unique items (e.g., usernames, phone numbers, etc.), remember that you can set an optional <strong>maximum price</strong> which, if paid, will immediately end the auction. Note that collectibles are subject to a <strong>5% platform fee</strong> on each transaction.</p>
|
||||
</blockquote>
|
||||
<h3><a class="anchor-link" href="#auctioning-basic-usernames"><i class="anchor-icon"></i></a><a class="anchor" name="auctioning-basic-usernames"></a>Auctioning Basic Usernames</h3>
|
||||
<p>Any basic username from your Telegram account can be <a href="#listing-your-username-on-fragment">auctioned on Fragment</a>, including those that are linked to your <strong>profile</strong>, <strong>public groups</strong> or <strong>public channels</strong>.</p>
|
||||
<p>Interested buyers can <strong>place a bid</strong> to <strong>start an auction</strong> at any time – <a href="#when-the-auction-ends">when the auction ends</a>, the basic username will be <strong>converted</strong> into a collectible and assigned to the winner.</p>
|
||||
<p>The original owner of the basic username will <strong>earn</strong> all proceeds <a href="#q-are-there-any-transaction-fees">minus applicable fees</a>. They may also try to win the auction themselves to retain ownership of the new collectible.</p>
|
||||
<h4><a class="anchor-link" href="#listing-your-username-on-fragment"><i class="anchor-icon"></i></a><a class="anchor" name="listing-your-username-on-fragment"></a>Listing your username on Fragment</h4>
|
||||
<p>If you own a <strong>basic username</strong> on <strong>Telegram</strong> and wish to make it available on Fragment, simply:</p>
|
||||
<ul>
|
||||
<li><a href="#connecting-to-fragment-and-telegram">Log in</a> to Fragment with both your Telegram and TON accounts.</li>
|
||||
<li>The TON wallet you've connected will receive the proceeds from the auction, so make sure to connect a wallet that you own.</li>
|
||||
<li>Tap on your TON wallet in the top right corner and choose <a href="/convert">'Convert to Collectibles'</a> (or follow the 'Convert Usernames to Collectibles' link in 'My Assets').</li>
|
||||
<li>Select a username from the list. Note that to prevent abuse, usernames you acquired or reassigned (i.e., moved it from your profile to a channel you own, etc.) very recently may not be immediately available.</li>
|
||||
<li>Set a minimum bid. Buyers will have to pay at least this amount to acquire the collectible.</li>
|
||||
</ul>
|
||||
<p>After confirming, your username will remain available for auction for an <strong>unlimited time</strong> – interested buyers, including yourself, can <strong>place the first bid</strong> to start a <strong>7-day auction</strong>.</p>
|
||||
<blockquote>
|
||||
<p>While a username is available for auction, you can't <strong>reassign</strong> it to a <em>different</em> chat or profile (but you can <em>remove</em> it to protect privacy, or <strong>restore</strong> it in the same place). You can <a href="#canceling-an-auction">cancel</a> the auction to reassign the username elsewhere.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor-link" href="#canceling-an-auction"><i class="anchor-icon"></i></a><a class="anchor" name="canceling-an-auction"></a>Canceling an auction</h4>
|
||||
<p>You can cancel the auction at any time <strong>before the first bid</strong> is placed. If you do so, you will keep the basic username and it will <strong>not be converted</strong> into a collectible.</p>
|
||||
<p>After the first bid is placed, the auction can no longer be canceled.</p>
|
||||
<h4><a class="anchor-link" href="#when-the-auction-ends"><i class="anchor-icon"></i></a><a class="anchor" name="when-the-auction-ends"></a>When the auction ends</h4>
|
||||
<p>When the auction <strong>ends</strong> you will <strong>earn</strong> all proceeds minus <a href="#q-are-there-any-transaction-fees">applicable fees</a>. The outcome may slightly differ depending on the winner:</p>
|
||||
<ul>
|
||||
<li><strong>If someone else wins</strong> - The wallet they used to place the highest bid will receive the collectible. All proceeds minus a 5% platform fee and one-time conversion fee will be transferred to the wallet that you connected to Fragment when <a href="#listing-your-username-on-fragment">listing</a> your username.</li>
|
||||
<li><strong>If you win the auction</strong> - You will <strong>own the collectible</strong>, the wallet you used to place the highest bid will receive it. You will also get your winning bid back, minus a 5% <a href="#">platform fee</a> and one-time <a href="#q-what-39s-the-conversion-fee">conversion fee</a>.</li>
|
||||
</ul>
|
||||
<p>The username will <strong>continue</strong> to link to the same chat until it is reassigned. Outdated apps may not display it in the info panel – make sure to always update your app to the latest version.</p>
|
||||
<h4><a class="anchor-link" href="#using-your-new-collectible"><i class="anchor-icon"></i></a><a class="anchor" name="using-your-new-collectible"></a>Using your new collectible</h4>
|
||||
<p>After receiving a collectible, you can:</p>
|
||||
<ul>
|
||||
<li><a href="#assigning-collectible-usernames-to-telegram">Assign it on Telegram</a>. Any profile, group or channel can have <a href="https://telegram.org/blog/topics-in-groups-collectible-usernames#collectible-usernames">multiple collectible usernames</a> linking to it.</li>
|
||||
<li><a href="#putting-collectibles-up-for-auction">Sell it or start a new auction</a> – without paying a <a href="#q-what-39s-the-conversion-fee">conversion fee</a>.</li>
|
||||
<li>Securely transfer it to another person or wallet <strong>for free</strong> via the NFT tab in Tonkeeper.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<h2><a class="anchor-link" href="#assigning-collectible-usernames-to-telegram"><i class="anchor-icon"></i></a><a class="anchor" name="assigning-collectible-usernames-to-telegram"></a>Assigning Collectible Usernames to Telegram</h2>
|
||||
<p>You can assign <strong>collectible usernames</strong> to your personal Telegram <strong>profile</strong> or to Telegram public <strong>groups</strong> and <strong>channels</strong> you own. Any of these entities can have up to <strong>one</strong> basic username and <strong>any number</strong> of collectible usernames – you can also customize the order in which collectibles appear in the chat's info page, or toggle them off entirely.</p>
|
||||
<blockquote>
|
||||
<p>You can also upgrade collectible usernames to assign them to <strong>Telegram bots</strong>. To upgrade, assign the username to a bot and pay a one-time fee.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor-link" href="#connecting-to-fragment"><i class="anchor-icon"></i></a><a class="anchor" name="connecting-to-fragment"></a>Connecting to Fragment</h4>
|
||||
<p>Before you can assign a username, you must connect both your <strong>Telegram account</strong> and <strong>TON wallet</strong> to Fragment. To do so, follow the instructions available <a href="#connecting-to-fragment-and-telegram">here</a>.</p>
|
||||
<p>Note that the wallet you are connecting must be the one currently holding your collectible – if you don't see any items in your wallet please check our <a href="#q-i-won-an-auction-but-can-39t-see-the-collectible-in-my-assets">FAQ</a>.</p>
|
||||
<blockquote>
|
||||
<p>Fragment <strong>doesn't store</strong> any information that could tie your wallet to your Telegram account.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor-link" href="#assigning-your-collectible"><i class="anchor-icon"></i></a><a class="anchor" name="assigning-your-collectible"></a>Assigning your collectible</h4>
|
||||
<p>Open the <a href="/my/assets">My Assets</a> page and tap on '<em>Assign to Telegram</em>', then select a chat and tap '<em>Assign</em>' to confirm your choice.</p>
|
||||
<blockquote>
|
||||
<p>This choice is not permanent, you can pick another chat at any time.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor-link" href="#activating-your-collectible-on-telegram"><i class="anchor-icon"></i></a><a class="anchor" name="activating-your-collectible-on-telegram"></a>Activating your collectible on Telegram</h4>
|
||||
<p>Once your collectible has been assigned, it will not redirect to your designated chat right away. To activate and list it in the public info page of your chat, you have to <strong>manually enable it</strong>.</p>
|
||||
<p>To do so, follow these simple steps:</p>
|
||||
<ul>
|
||||
<li><p><strong>Personal Profile</strong>: Settings > Username > Enable and sort the available usernames as needed.</p>
|
||||
</li>
|
||||
<li><p><strong>Public Group</strong>: Open your group settings ( ⋮ <em>Android</em>, '…' <em>iOS</em> ) > Group Type > '<em>Links order</em>' > Tap on your collectible to enable it.</p>
|
||||
</li>
|
||||
<li><p><strong>Public Channel</strong>: Open your channel settings ⋮ <em>Android</em>, '…' <em>iOS</em> ) > Channel Type > '<em>Links order</em>' > Tap on your collectible to enable it.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<blockquote>
|
||||
<p>Older Telegram clients may not show any username beyond the first on the info page of your chats.</p>
|
||||
</blockquote>
|
||||
<h2><a class="anchor-link" href="#faq"><i class="anchor-icon"></i></a><a class="anchor" name="faq"></a>FAQ</h2>
|
||||
<p>This is a list of frequently asked questions on Fragment and Telegram collectibles.</p>
|
||||
<h4><a class="anchor-link" href="#q-i-deposited-some-money-but-my-wallet-is-empty-what-happened"><i class="anchor-icon"></i></a><a class="anchor" name="q-i-deposited-some-money-but-my-wallet-is-empty-what-happened"></a>Q: I deposited some money but my wallet is empty, what happened?</h4>
|
||||
<p>Not to worry, this is likely due to one of the following reasons:</p>
|
||||
<ul>
|
||||
<li>You did not wait long enough – most transactions take a few seconds, but some might take 30 minutes or more.</li>
|
||||
<li>You are looking in the wrong place, funds will not appear directly on Fragment, they're only visible in your <strong>Tonkeeper wallet</strong>.</li>
|
||||
<li>You have selected the wrong wallet within Tonkeeper. One “account” can contain several wallets; to fix this, go to <em>Settings > Active address</em> and try rotating through them until you find the one with your funds.</li>
|
||||
<li>Your transaction didn't go through – check with your bank or credit card, as some may deny unusual purchases automatically.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor-link" href="#q-are-there-any-transaction-fees"><i class="anchor-icon"></i></a><a class="anchor" name="q-are-there-any-transaction-fees"></a>Q: Are there any transaction fees?</h4>
|
||||
<p>Collectibles are subject to a <strong>5% platform fee</strong> on each sale (direct sales and the highest bid when an auction ends). Transactions may also be subject to small <strong>blockchain fees</strong> (~1 Toncoin) that are outside Fragment's control.</p>
|
||||
<h4><a class="anchor-link" href="#q-what-39s-the-conversion-fee"><i class="anchor-icon"></i></a><a class="anchor" name="q-what-39s-the-conversion-fee"></a>Q: What's the conversion fee?</h4>
|
||||
<p>Owners of basic usernames can <a href="#auctioning-basic-usernames">auction them</a> on Fragment – <strong>converting the usernames</strong> into collectibles. A flat <strong>conversion fee</strong> of <strong>5</strong> Toncoins is deducted from the proceeds of this initial auction.</p>
|
||||
<blockquote>
|
||||
<p>This fee is collected <strong>only once</strong>. All future sales for a collectible are only subject to the <a href="#q-are-there-any-transaction-fees">5% platform fee</a> and necessary blockchain fees.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor-link" href="#q-i-won-an-auction-how-do-i-use-my-new-collectible"><i class="anchor-icon"></i></a><a class="anchor" name="q-i-won-an-auction-how-do-i-use-my-new-collectible"></a>Q: I won an auction, how do I use my new collectible?</h4>
|
||||
<p>Tap on <a href="/my/assets">My Assets</a> to see all your collectibles – you can freely sell them, put them up for auction or <a href="#assigning-collectible-usernames-to-telegram">use them on Telegram</a>.</p>
|
||||
<h4><a class="anchor-link" href="#q-can-i-transfer-my-collectible-to-someone"><i class="anchor-icon"></i></a><a class="anchor" name="q-can-i-transfer-my-collectible-to-someone"></a>Q: Can I transfer my collectible to someone?</h4>
|
||||
<p>Fragment hosts <a href="#putting-collectibles-up-for-auction">open sales and auctions</a> of collectibles, but any owner can transfer a collectible to someone else <strong>for free</strong> via the TON blockchain. For example, the 'NFT' tab in <strong>Tonkeeper</strong> allows you to transfer collectibles to another wallet.</p>
|
||||
<h4><a class="anchor-link" href="#q-why-is-the-collectible-i-want-marked-as-unavailable"><i class="anchor-icon"></i></a><a class="anchor" name="q-why-is-the-collectible-i-want-marked-as-unavailable"></a>Q: Why is the collectible I want marked as unavailable?</h4>
|
||||
<p>Some collectibles may be reserved and will become available at a later date. Others could have been bought before you. </p>
|
||||
<p>Basic Telegram usernames that are currently in use are marked as <em>taken</em>. Fragment lets you make anonymous offers to the username owner, who can choose to <a href="#auctioning-basic-usernames">make it available for purchase</a> at any time.</p>
|
||||
<h4><a class="anchor-link" href="#q-i-won-an-auction-but-can-39t-see-the-collectible-in-my-assets"><i class="anchor-icon"></i></a><a class="anchor" name="q-i-won-an-auction-but-can-39t-see-the-collectible-in-my-assets"></a>Q: I won an auction but can't see the collectible in my assets. What happened?</h4>
|
||||
<p>This technology relies on a distributed network, transactions can take some time. Most transactions will only take seconds, but please allow up to 30 minutes for your collectibles to appear.</p>
|
||||
<h4><a class="anchor-link" href="#q-i-assigned-a-collectible-but-can-39t-see-it-on-telegram-why"><i class="anchor-icon"></i></a><a class="anchor" name="q-i-assigned-a-collectible-but-can-39t-see-it-on-telegram-why"></a>Q: I assigned a collectible but can't see it on Telegram, why?</h4>
|
||||
<p>This is likely due to one of the following reasons:</p>
|
||||
<ul>
|
||||
<li>You did not <a href="#activating-your-collectible-on-telegram">enable the collectible</a> on Telegram – this <strong>is not</strong> the same as assigning it on Fragment, it's a separate step.</li>
|
||||
<li>You are using an outdated client that doesn't support collectibles - please <strong>update</strong> your app to version <strong>9.1</strong> or above.</li>
|
||||
<li>You are looking at a cached or outdated menu, please try fully <strong>closing</strong> and <strong>reopening</strong> your app.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor-link" href="#q-can-i-assign-my-upgraded-username-to-a-different-bot"><i class="anchor-icon"></i></a><a class="anchor" name="q-can-i-assign-my-upgraded-username-to-a-different-bot"></a>Q: Can I assign my upgraded username to a different bot?</h4>
|
||||
<p>Yes, upgrading a collectible username is <strong>permanent</strong>. You can freely trade your upgraded collectible or assign it to a different bot – it will never lose its upgraded status even if it changes owners.</p>
|
||||
<h4><a class="anchor-link" href="#q-will-i-lose-my-collectibles-if-i-lose-my-phone-account-session"><i class="anchor-icon"></i></a><a class="anchor" name="q-will-i-lose-my-collectibles-if-i-lose-my-phone-account-session"></a>Q: Will I lose my collectibles if I lose my phone/account/session/phone number?</h4>
|
||||
<p><strong>No</strong>, as long as you safely store the backup credentials (i.e. word list) of your TON wallet, your collectibles will <strong>always be safe</strong> and you can reassign them to a new Telegram account at any time. This is also true for any platform supporting the collectibles.</p>
|
||||
<h4><a class="anchor-link" href="#q-are-my-collectibles-tied-to-any-specific-platform"><i class="anchor-icon"></i></a><a class="anchor" name="q-are-my-collectibles-tied-to-any-specific-platform"></a>Q: Are my collectibles tied to any specific platform?</h4>
|
||||
<p><strong>No</strong>, as long as you safely store the backup credentials (i.e. word list) of your TON wallet, your collectibles will <strong>always be safe</strong> regardless of which platform you use them on.</p>
|
||||
<h4><a class="anchor-link" href="#q-can-i-integrate-collectibles-into-my-own-platform"><i class="anchor-icon"></i></a><a class="anchor" name="q-can-i-integrate-collectibles-into-my-own-platform"></a>Q: Can I integrate collectibles into my own platform?</h4>
|
||||
<p><strong>Yes</strong>, the TON blockchain is publicly accessible and anyone is free to reference collectibles or use them within their own platform.</p>
|
||||
<h4><a class="anchor-link" href="#q-i-lost-my-wallet-can-fragment-recover-it"><i class="anchor-icon"></i></a><a class="anchor" name="q-i-lost-my-wallet-can-fragment-recover-it"></a>Q: I lost my wallet, can Fragment recover it?</h4>
|
||||
<p>Fragment is not able to restore wallets as it never stores or comes into contact with private credentials. Wallets are strictly private and it is the responsibility of the owner to ensure that the recovery keys are properly stored.</p>
|
||||
<h4><a class="anchor-link" href="#q-i-bought-a-collectible-but-now-i-39d-like-to-buy-a-better-one"><i class="anchor-icon"></i></a><a class="anchor" name="q-i-bought-a-collectible-but-now-i-39d-like-to-buy-a-better-one"></a>Q: I bought a collectible but now I'd like to buy a better one, can Fragment replace it?</h4>
|
||||
<p>All purchases are final since ownership is permanently fixed in the blockchain, however, nothing prevents buyers from purchasing multiple collectibles.</p>
|
||||
<h4><a class="anchor-link" href="#q-what-happens-if-somebody-places-a-higher-bid-than-me"><i class="anchor-icon"></i></a><a class="anchor" name="q-what-happens-if-somebody-places-a-higher-bid-than-me"></a>Q: What happens if somebody places a higher bid than me?</h4>
|
||||
<p>If somebody places a higher bid your Toncoins will be refunded automatically. Funds will normally reappear in your wallet within a few seconds, but this may sometimes take longer due to the nature of the blockchain network.</p>
|
||||
<h4><a class="anchor-link" href="#q-i-have-the-highest-bid-in-an-active-auction-but-would-like-to"><i class="anchor-icon"></i></a><a class="anchor" name="q-i-have-the-highest-bid-in-an-active-auction-but-would-like-to"></a>Q: I have the highest bid in an active auction but would like to place an even higher bid. Will I lose my funds?</h4>
|
||||
<p><strong>No,</strong> any time someone (including yourself) outbids you, your previous bid will be refunded immediately. </p>
|
||||
<h4><a class="anchor-link" href="#q-i-sold-my-collectible-but-i-want-it-back-can-fragment-revert-t"><i class="anchor-icon"></i></a><a class="anchor" name="q-i-sold-my-collectible-but-i-want-it-back-can-fragment-revert-t"></a>Q: I sold my collectible but I want it back. Can Fragment revert the transaction?</h4>
|
||||
<p>Transactions are permanent – this secures your entities but also means that once a purchase is finalized it cannot be undone. Of course, you are free to buy back the collectible from its new owner, if they agree.</p>
|
||||
<h4><a class="anchor-link" href="#q-i-put-my-basic-username-up-for-auction-but-i-changed-my-mind-c"><i class="anchor-icon"></i></a><a class="anchor" name="q-i-put-my-basic-username-up-for-auction-but-i-changed-my-mind-c"></a>Q: I put my basic username up for auction but I changed my mind, can I take it back?</h4>
|
||||
<p>You can <a href="#canceling-an-auction">cancel</a> the auction <strong>before the first bid is placed</strong>. After the first bid, the auction starts and cannot be canceled.</p>
|
||||
<p>Likewise, the conversion of a basic username into a collectible is <strong>permanent</strong> and cannot be reversed after the first bid is placed.</p>
|
||||
<h4><a class="anchor-link" href="#q-i-auctioned-my-basic-username-and-nobody-bid-on-it-why-wasn-39"><i class="anchor-icon"></i></a><a class="anchor" name="q-i-auctioned-my-basic-username-and-nobody-bid-on-it-why-wasn-39"></a>Q: I auctioned my basic username and nobody bid on it, why wasn't it assigned to me?</h4>
|
||||
<p>The collectible was assigned to the wallet that placed the highest bid during the auction. This <strong>can be different</strong> from the wallet you connected to Fragment. If nobody else participated in the auction, you will find the collectible in the wallet you had connected to Fragment when the username was first made available for auction.</p>
|
||||
<h4><a class="anchor-link" href="#q-i-own-a-basic-telegram-username-but-cannot-put-it-up-for-aucti"><i class="anchor-icon"></i></a><a class="anchor" name="q-i-own-a-basic-telegram-username-but-cannot-put-it-up-for-aucti"></a>Q: I own a basic Telegram username but cannot put it up for auction, why?</h4>
|
||||
<p>When Telegram <strong>denies</strong> Fragment's request to auction a basic username, it is likely due to one of the following reasons:</p>
|
||||
<ul>
|
||||
<li>You did not set up a <a href="https://t.me/TelegramTips/67">2FA password</a> on your Telegram account, or you set it up too recently.</li>
|
||||
<li>You haven't owned that username for a sufficiently long period of time.</li>
|
||||
<li>The username has been recently moved (e.g. from your account to one of your channels, etc.).</li>
|
||||
<li>Telegram has other reasons to believe you might be acting in bad faith.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor-link" href="#q-how-can-i-log-in-to-fragment-with-a-different-telegram-account"><i class="anchor-icon"></i></a><a class="anchor" name="q-how-can-i-log-in-to-fragment-with-a-different-telegram-account"></a>Q: How can I log in to Fragment with a different Telegram account?</h4>
|
||||
<p>To fully disconnect your Telegram account from Fragment and log in with another phone number, simply open your Telegram app and navigate to:</p>
|
||||
<ul>
|
||||
<li><strong>Android</strong>: <em>Settings</em> > <em>Privacy & Security</em> > <em>Bots and websites</em> > <em>Logged in with Telegram</em> </li>
|
||||
<li><strong>iOS</strong>: <em>Settings</em> > <em>Privacy & Security</em> > <em>Active Websites</em> > <em>Logged in with Telegram</em> </li>
|
||||
</ul>
|
||||
<p>Once there, remove your Fragment session and reopen the website to <a href="#connecting-to-fragment-and-telegram">connect</a> a different Telegram account.</p>
|
||||
<h3><a class="anchor-link" href="#anonymous-offers-for-basic-usernames"><i class="anchor-icon"></i></a><a class="anchor" name="anonymous-offers-for-basic-usernames"></a>Anonymous Offers for Basic Usernames</h3>
|
||||
<h4><a class="anchor-link" href="#q-can-i-suggest-someone-to-sell-their-username-on-fragment"><i class="anchor-icon"></i></a><a class="anchor" name="q-can-i-suggest-someone-to-sell-their-username-on-fragment"></a>Q: Can I suggest someone to sell their username on Fragment?</h4>
|
||||
<p>Fragment allows users to make offers for basic Telegram usernames in exchange for a small fee – all offers are forwarded <strong>anonymously</strong> from buyer to seller and neither party is made aware of any identifying information (e.g., Telegram id, username, etc.).</p>
|
||||
<blockquote>
|
||||
<p>Note that everyone will see which TON wallet made the offer.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor-link" href="#q-i-made-an-offer-for-a-username-marked-as-taken-what-happens-no"><i class="anchor-icon"></i></a><a class="anchor" name="q-i-made-an-offer-for-a-username-marked-as-taken-what-happens-no"></a>Q: I made an offer for a username marked as <em>’Taken’</em>. What happens now?</h4>
|
||||
<p>Making an offer for a username marked as <em>’Taken’</em> requires a small non-refundable fee to show that your offer is serious and not meant to bother the username owner. The amount you enter in ‘How much would you pay?’ is <strong>not binding</strong> and you will not be obligated to pay that price if the name becomes available for auction.</p>
|
||||
<p>Following your offer, the owner can make the name available for purchase on Fragment via a <a href="#auctioning-basic-usernames">public auction</a> – they are free to choose any <strong>minimum bid</strong>. Anyone will be able to bid for the username, and you are free to participate in the auction to acquire the name.</p>
|
||||
<h4><a class="anchor-link" href="#q-will-i-be-notified-if-the-username-becomes-available-for-aucti"><i class="anchor-icon"></i></a><a class="anchor" name="q-will-i-be-notified-if-the-username-becomes-available-for-aucti"></a>Q: Will I be notified if the username becomes available for auction?</h4>
|
||||
<p>If you were <a href="https://fragment.com/about#connecting-to-fragment-and-telegram">logged in with your Telegram account</a> on Fragment when you made your offer, you will be automatically subscribed to updates about the username.</p>
|
||||
<p>If you were not logged in, you can always <a href="https://fragment.com/about#connecting-to-fragment-and-telegram">log in</a>, open the page of the desired username and tap <strong>'Subscribe to updates'</strong>.</p>
|
||||
<h3><a class="anchor-link" href="#anonymous-numbers"><i class="anchor-icon"></i></a><a class="anchor" name="anonymous-numbers"></a>Anonymous Numbers</h3>
|
||||
<h4><a class="anchor-link" href="#q-can-i-buy-an-anonymous-number-directly-from-telegram"><i class="anchor-icon"></i></a><a class="anchor" name="q-can-i-buy-an-anonymous-number-directly-from-telegram"></a>Q: Can I buy an anonymous number directly from Telegram?</h4>
|
||||
<p>No, you can only buy numbers which other users are willing to sell.</p>
|
||||
<h4><a class="anchor-link" href="#q-can-i-use-anonymous-numbers-to-receive-sms-and-phone-calls"><i class="anchor-icon"></i></a><a class="anchor" name="q-can-i-use-anonymous-numbers-to-receive-sms-and-phone-calls"></a>Q: Can I use anonymous numbers to receive SMS and phone calls?</h4>
|
||||
<p>No, anonymous numbers work only on Telegram, they cannot receive regular SMS or phone calls.</p>
|
||||
<h4><a class="anchor-link" href="#q-can-an-existing-telegram-account-change-its-connected-phone-nu"><i class="anchor-icon"></i></a><a class="anchor" name="q-can-an-existing-telegram-account-change-its-connected-phone-nu"></a>Q: Can an existing Telegram account change its connected phone number to an Anonymous Number?</h4>
|
||||
<p>Yes, any existing Telegram account can <a href="https://telegram.org/faq#q-how-do-i-change-my-phone-number">change its number</a> to any anonymous number that is not already connected to a Telegram account.</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
<footer class="tm-footer">
|
||||
<div class="tm-footer-links">
|
||||
<a href="/" class="tm-footer-link">Top Auctions</a>
|
||||
<a href="/about" class="tm-footer-link">About</a>
|
||||
<a href="/terms" class="tm-footer-link">Terms</a>
|
||||
<a href="/privacy" class="tm-footer-link">Privacy</a>
|
||||
</div>
|
||||
</footer></div>
|
||||
<script src="/js/jquery.min.js?1"></script>
|
||||
<script src="/js/bootstrap.min.js"></script>
|
||||
<script src="/js/main-aj.js?67"></script>
|
||||
|
@ -40,10 +319,46 @@
|
|||
<script src="/js/qr-code-styling.js?1"></script>
|
||||
<script src="/js/auction.js?64"></script>
|
||||
<script src="/js/tgsticker.js?31"></script>
|
||||
<script src="https://telegram.org/js/telegram-widget.js?22"></script>
|
||||
|
||||
<script>ajInit({"version":481,"apiUrl":"\/api?hash=telegram-crawler","unauth":true});</script>
|
||||
<script id="aj_script">Aj._useScrollHack=true;
|
||||
<script>ajInit({"version":503,"apiUrl":"\/api?hash=telegram-crawler","unauth":true,"state":{"tonRate":"telegram-crawler"}});</script>
|
||||
<script id="aj_script">l.add({"WEB_POPUP_TON_AUTH_HEADER":"Connect TON","WEB_POPUP_TON_AUTH_TEXT":"Scan the QR code with your phone's camera or Tonkeeper.","WEB_POPUP_TON_AUTH_HINT":"We do not receive or store your wallet login details, so your TON is safe.","WEB_POPUP_TON_AUTH_BUTTON":"Sign in with Tonkeeper","WEB_POPUP_QR_OR_BUTTON":"Or press the button below"});
|
||||
Aj._useScrollHack=true;
|
||||
Main.init();
|
||||
Aj.onLoad(function(state) {
|
||||
state.unAuth = true;
|
||||
Login.init({"bot_id":5444323279,"request_access":"write"});
|
||||
$('.login-link').on('click', function(e) {
|
||||
var return_to = this.href || false;
|
||||
e.stopImmediatePropagation();
|
||||
e.preventDefault();
|
||||
Login.open(return_to);
|
||||
});
|
||||
});
|
||||
Aj.onUnload(function(state) {
|
||||
$('.login-link').off('click');
|
||||
});
|
||||
Aj.onLoad(function(state) {
|
||||
$('.ton-auth-link').on('click', function(e) {
|
||||
e.stopImmediatePropagation();
|
||||
e.preventDefault();
|
||||
QR.showPopup({
|
||||
request: {
|
||||
method: 'getTonAuthLink'
|
||||
},
|
||||
title: l('WEB_POPUP_TON_AUTH_HEADER'),
|
||||
description: l('WEB_POPUP_TON_AUTH_TEXT'),
|
||||
hint: l('WEB_POPUP_TON_AUTH_HINT'),
|
||||
tk_label: l('WEB_POPUP_TON_AUTH_BUTTON'),
|
||||
onConfirm: function() {
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
Aj.onUnload(function(state) {
|
||||
$('.ton-auth-link').off('click');
|
||||
});
|
||||
</script>
|
||||
<script>Aj.pageLoaded();</script>
|
||||
|
||||
|
|
Loading…
Reference in a new issue