mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2024-12-18 04:39:21 +01:00
347 lines
35 KiB
HTML
347 lines
35 KiB
HTML
<!DOCTYPE html>
|
||
<html class="">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<title>Telegram APIs</title>
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<meta property="description" content="We offer three kinds of APIs for developers. The Bot API allows you to easily create programs that use Telegram messages…">
|
||
<meta property="og:title" content="Telegram APIs">
|
||
<meta property="og:image" content="df8a0f9162ddfc1daf">
|
||
<meta property="og:description" content="We offer three kinds of APIs for developers. The Bot API allows you to easily create programs that use Telegram messages…">
|
||
<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">
|
||
<link rel="icon" type="image/png" sizes="16x16" href="/img/favicon-16x16.png">
|
||
<link rel="alternate icon" href="/img/favicon.ico" type="image/x-icon" />
|
||
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
|
||
|
||
<link href="/css/telegram.css?241" rel="stylesheet" media="screen">
|
||
<style>
|
||
</style>
|
||
</head>
|
||
<body class="preload">
|
||
<div class="dev_page_wrap">
|
||
<div class="dev_page_head navbar navbar-static-top navbar-tg">
|
||
<div class="navbar-inner">
|
||
<div class="container clearfix">
|
||
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
|
||
<ul class="nav navbar-nav">
|
||
<li><a href="//telegram.org/">Home</a></li>
|
||
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
|
||
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
|
||
<li class="active"><a href="/api">API</a></li>
|
||
<li class=""><a href="/mtproto">Protocol</a></li>
|
||
<li class=""><a href="/schema">Schema</a></li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="container clearfix">
|
||
<div class="dev_page">
|
||
<div id="dev_page_content_wrap" class=" ">
|
||
<div class="dev_page_bread_crumbs"></div>
|
||
<h1 id="dev_page_title">Telegram APIs</h1>
|
||
|
||
<div id="dev_page_content"><p>We offer three kinds of APIs for developers. The <a href="#bot-api"><strong>Bot API</strong></a> allows you to easily create programs that use Telegram messages for an interface. The <a href="#tdlib-build-your-own-telegram"><strong>Telegram API and TDLib</strong></a> allow you to build your own customized Telegram clients. You are welcome to use both APIs free of charge. Lastly, the <a href="#gateway-api"><strong>Gateway API</strong></a> allows any business, app or website to send verification codes through Telegram instead of traditional SMS.</p>
|
||
<p>You can also add <a href="/widgets"><strong>Telegram Widgets</strong></a> to your website.</p>
|
||
<p>Designers are welcome to create <a href="/animated_stickers"><strong>Animated Stickers</strong></a> or <a href="/themes"><strong>Custom Themes</strong></a> for Telegram.</p>
|
||
<hr>
|
||
<h3><a class="anchor" name="bot-api" href="#bot-api"><i class="anchor-icon"></i></a>Bot API</h3>
|
||
<div>
|
||
<a href="/file/811140327/1/zlN4goPTupk/9ff2f2f01c4bd1b013" target="_blank"><img src="/file/811140934/1/tbDSLHSaijc/fdcc7b6d5fb3354adf" title="The Botfather. Click for hi-res picture" style="max-width: 200px;float:right" /></a>
|
||
</div>
|
||
|
||
<p>This API allows you to connect bots to our system. <a href="/bots"><strong>Telegram Bots</strong></a> are special accounts that do not require an additional phone number to set up. These accounts serve as an interface for code running somewhere on your server.</p>
|
||
<p>To use this, you don't need to know anything about how our MTProto encryption protocol works — our intermediary server will handle all encryption and communication with the Telegram API for you. You communicate with this server via a simple HTTPS-interface that offers a simplified version of the Telegram API.</p>
|
||
<blockquote>
|
||
<p><a href="/bots"><strong>Learn more about the Bot API here »</strong></a></p>
|
||
</blockquote>
|
||
<p>Bot developers can also make use of our <a href="/bots/payments"><strong>Payments API</strong></a> to accept <strong>payments</strong> from Telegram users around the world.</p>
|
||
<hr>
|
||
<h3><a class="anchor" name="tdlib-build-your-own-telegram" href="#tdlib-build-your-own-telegram"><i class="anchor-icon"></i></a>TDLib – build your own Telegram</h3>
|
||
<p>Even if you're looking for maximum customization, you don't have to create your app from scratch. Try our <a href="https://core.telegram.org/tdlib"><strong>Telegram Database Library</strong></a> (or simply TDLib), a tool for third-party developers that makes it easy to build fast, secure and feature-rich Telegram apps.</p>
|
||
<p>TDLib takes care of all <strong>network implementation</strong> details, <strong>encryption</strong> and <strong>local data storage</strong>, so that you can dedicate more time to design, responsive interfaces and beautiful animations.</p>
|
||
<p>TDLib supports all Telegram features and makes developing Telegram apps a breeze on any platform. It can be used on Android, iOS, Windows, macOS, Linux and virtually any other system. The library is open source and compatible with virtually <strong>any programming language</strong>.</p>
|
||
<blockquote>
|
||
<p><a href="https://core.telegram.org/tdlib"><strong>Learn more about TDLib here »</strong></a></p>
|
||
</blockquote>
|
||
<hr>
|
||
<h2><a class="anchor" name="gateway-api" href="#gateway-api"><i class="anchor-icon"></i></a>Gateway API</h2>
|
||
<p>The Telegram Gateway API allows any business, app or website to send authorization codes through Telegram instead of traditional SMS – offering a powerful and convenient way to <strong>lower costs</strong> while increasing the <strong>security</strong> and <strong>delivery speed</strong> of your codes to Telegram’s 950+ million monthly active users. Users will <strong>instantly receive</strong> messages with codes in a special chat inside Telegram.</p>
|
||
<blockquote>
|
||
<p><a href="/gateway"><strong>Telegram's Gateway API is completely free to test. Learn more here »</strong></a></p>
|
||
</blockquote>
|
||
<hr>
|
||
<h3><a class="anchor" name="telegram-api" href="#telegram-api"><i class="anchor-icon"></i></a>Telegram API</h3>
|
||
<p>This API allows you to build your own customized Telegram clients. It is 100% open for all developers who wish to create Telegram applications on our platform. Feel free to study the open <a href="https://telegram.org/apps#source-code">source code</a> of existing Telegram applications for examples of how things work here. Don't forget to <a href="/api/obtaining_api_id">register</a> your application in our system. </p>
|
||
<ul>
|
||
<li><a href="#getting-started">Getting Started</a></li>
|
||
<li><a href="#security">Security</a></li>
|
||
<li><a href="#optimization">Optimization</a></li>
|
||
<li><a href="#api-methods">API methods</a></li>
|
||
</ul>
|
||
<h3><a class="anchor" name="getting-started" href="#getting-started"><i class="anchor-icon"></i></a>Getting started</h3>
|
||
<h4><a class="anchor" name="creating-an-application" href="#creating-an-application"><i class="anchor-icon"></i></a><a href="/api/obtaining_api_id">Creating an application</a></h4>
|
||
<p>How to get your application identifier and create a new Telegram app.</p>
|
||
<h4><a class="anchor" name="user-authorization" href="#user-authorization"><i class="anchor-icon"></i></a><a href="/api/auth">User authorization</a></h4>
|
||
<p>How to register a user's phone to start using the API.</p>
|
||
<h4><a class="anchor" name="two-factor-authentication" href="#two-factor-authentication"><i class="anchor-icon"></i></a><a href="/api/srp">Two-factor authentication</a></h4>
|
||
<p>How to login to a user's account if they have enabled 2FA, how to change password.</p>
|
||
<h4><a class="anchor" name="qr-code-login" href="#qr-code-login"><i class="anchor-icon"></i></a><a href="/api/qr-login">QR code login</a></h4>
|
||
<p><a href="https://en.wikipedia.org/wiki/QR_code">QR code</a> login flow</p>
|
||
<h4><a class="anchor" name="error-handling" href="#error-handling"><i class="anchor-icon"></i></a><a href="/api/errors">Error handling</a></h4>
|
||
<p>How to handle API return errors correctly.</p>
|
||
<h4><a class="anchor" name="handling-different-data-centers" href="#handling-different-data-centers"><i class="anchor-icon"></i></a><a href="/api/datacenter">Handling different data centers</a></h4>
|
||
<p>How to connect to the closest DC access point for faster interaction with the API, and things to watch out for when developing a client.</p>
|
||
<h4><a class="anchor" name="handling-updates" href="#handling-updates"><i class="anchor-icon"></i></a><a href="/api/updates">Handling updates</a></h4>
|
||
<p>How to subscribe to updates and handle them properly.</p>
|
||
<h4><a class="anchor" name="handling-push-notifications" href="#handling-push-notifications"><i class="anchor-icon"></i></a><a href="/api/push-updates">Handling PUSH-notifications</a></h4>
|
||
<p>How to subscribe and handle them properly.</p>
|
||
<h4><a class="anchor" name="channels-supergroups-gigagroups-and-basic-groups" href="#channels-supergroups-gigagroups-and-basic-groups"><i class="anchor-icon"></i></a><a href="/api/channel">Channels, supergroups, gigagroups and basic groups</a></h4>
|
||
<p>How to handle channels, supergroups, gigagroups, basic groups, and what's the difference between them.</p>
|
||
<h4><a class="anchor" name="forums" href="#forums"><i class="anchor-icon"></i></a><a href="/api/forum">Forums</a></h4>
|
||
<p>Telegram allows creating forums with multiple distinct topics.</p>
|
||
<h4><a class="anchor" name="channel-statistics" href="#channel-statistics"><i class="anchor-icon"></i></a><a href="/api/stats">Channel statistics</a></h4>
|
||
<p>Telegram offers detailed channel statistics for channels and supergroups. </p>
|
||
<h4><a class="anchor" name="calling-methods" href="#calling-methods"><i class="anchor-icon"></i></a><a href="/api/invoking">Calling methods</a></h4>
|
||
<p>Additional options for calling methods.</p>
|
||
<h4><a class="anchor" name="uploading-and-downloading-files" href="#uploading-and-downloading-files"><i class="anchor-icon"></i></a><a href="/api/files">Uploading and Downloading Files</a></h4>
|
||
<p>How to transfer large data batches correctly.</p>
|
||
<h4><a class="anchor" name="pagination" href="#pagination"><i class="anchor-icon"></i></a><a href="/api/offsets">Pagination</a></h4>
|
||
<p>How to fetch results from large lists of objects.</p>
|
||
<h4><a class="anchor" name="client-configuration" href="#client-configuration"><i class="anchor-icon"></i></a><a href="/api/config">Client configuration</a></h4>
|
||
<p>The MTProto API has multiple client configuration parameters that can be fetched with the appropriate methods. </p>
|
||
<h3><a class="anchor" name="security" href="#security"><i class="anchor-icon"></i></a>Security</h3>
|
||
<h4><a class="anchor" name="secret-chats-end-to-end-encryption" href="#secret-chats-end-to-end-encryption"><i class="anchor-icon"></i></a><a href="/api/end-to-end">Secret chats, end-to-end encryption</a></h4>
|
||
<p>End-to-end-encrypted messaging.</p>
|
||
<h4><a class="anchor" name="security-guidelines" href="#security-guidelines"><i class="anchor-icon"></i></a><a href="/mtproto/security_guidelines">Security guidelines</a></h4>
|
||
<p>Important checks required in your client application.</p>
|
||
<h4><a class="anchor" name="perfect-forward-secrecy" href="#perfect-forward-secrecy"><i class="anchor-icon"></i></a><a href="/api/pfs">Perfect Forward Secrecy</a></h4>
|
||
<p>Binding temporary authorization key to permanent ones.</p>
|
||
<h4><a class="anchor" name="end-to-end-encryption-in-voice-and-video-calls" href="#end-to-end-encryption-in-voice-and-video-calls"><i class="anchor-icon"></i></a><a href="https://core.telegram.org/api/end-to-end/video-calls">End-to-End Encryption in Voice and Video Calls</a></h4>
|
||
<p>End-to-end-encrypted calls.</p>
|
||
<h3><a class="anchor" name="optimization" href="#optimization"><i class="anchor-icon"></i></a>Optimization</h3>
|
||
<h4><a class="anchor" name="client-optimization" href="#client-optimization"><i class="anchor-icon"></i></a><a href="/api/optimisation">Client optimization</a></h4>
|
||
<p>Ways to boost API interactions.</p>
|
||
<h3><a class="anchor" name="api-methods" href="#api-methods"><i class="anchor-icon"></i></a>API methods</h3>
|
||
<h4><a class="anchor" name="available-method-list" href="#available-method-list"><i class="anchor-icon"></i></a><a href="/methods">Available method list</a></h4>
|
||
<p>A list of available high-level methods.</p>
|
||
<h4><a class="anchor" name="api-tl-schema-as-json" href="#api-tl-schema-as-json"><i class="anchor-icon"></i></a><a href="/schema">API TL-schema</a>, <a href="/schema/json">as JSON</a></h4>
|
||
<p>Text and JSON-presentation of types and methods used in API.</p>
|
||
<h4><a class="anchor" name="available-layer-list" href="#available-layer-list"><i class="anchor-icon"></i></a><a href="/api/layers">Available layer list</a></h4>
|
||
<p>A list of available schema versions.</p>
|
||
<h3><a class="anchor" name="other-articles" href="#other-articles"><i class="anchor-icon"></i></a>Other articles</h3>
|
||
<h4><a class="anchor" name="working-with-bots-using-the-mtproto-api" href="#working-with-bots-using-the-mtproto-api"><i class="anchor-icon"></i></a><a href="/api/bots">Working with bots, using the MTProto API</a></h4>
|
||
<p>How to work with bots using the MTProto API.</p>
|
||
<h4><a class="anchor" name="commands" href="#commands"><i class="anchor-icon"></i></a><a href="/api/bots/commands">Commands</a></h4>
|
||
<p><a href="/bots">Bots</a> offer a set of commands that can be used by users in private, or in a chat. </p>
|
||
<h4><a class="anchor" name="buttons" href="#buttons"><i class="anchor-icon"></i></a><a href="/api/bots/buttons">Buttons</a></h4>
|
||
<p>Users can interact with your bot via <strong>buttons</strong> or even <strong>inline buttons</strong>, straight from inline <strong>messages</strong> in <strong>any</strong> chat. </p>
|
||
<h4><a class="anchor" name="menu-button" href="#menu-button"><i class="anchor-icon"></i></a><a href="/api/bots/menu">Menu button</a></h4>
|
||
<p>Bots can choose the behavior of the menu button shown next to the text input field. </p>
|
||
<h4><a class="anchor" name="inline-queries" href="#inline-queries"><i class="anchor-icon"></i></a><a href="/api/bots/inline">Inline queries</a></h4>
|
||
<p>Users can interact with your bot via <strong>inline queries</strong>, straight from the <strong>text input field</strong> in <strong>any</strong> chat. </p>
|
||
<h4><a class="anchor" name="games" href="#games"><i class="anchor-icon"></i></a><a href="/api/bots/games">Games</a></h4>
|
||
<p>Bots can offer users HTML5 games to play solo or to compete against each other in groups and one-on-one chats; how to work with games in the MTProto API.</p>
|
||
<h4><a class="anchor" name="mini-apps" href="#mini-apps"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Mini apps</a></h4>
|
||
<p>Bots can offer users interactive <a href="/bots/webapps">HTML5 mini apps</a> to completely replace <strong>any website</strong>. </p>
|
||
<h4><a class="anchor" name="attachment-menu" href="#attachment-menu"><i class="anchor-icon"></i></a><a href="/api/bots/attach">Attachment menu</a></h4>
|
||
<p>Bots can install attachment menu entries, offering conveniently accessible, versatile mini apps.</p>
|
||
<h4><a class="anchor" name="stories" href="#stories"><i class="anchor-icon"></i></a><a href="/api/stories">Stories</a></h4>
|
||
<p>Telegram users and channels can easily post and view <a href="https://telegram.org/blog/stories">stories</a> through the API.</p>
|
||
<h4><a class="anchor" name="similar-channels" href="#similar-channels"><i class="anchor-icon"></i></a><a href="/api/recommend">Similar channels</a></h4>
|
||
<p>The API offers a method to obtain a list of similarly themed public channels, selected based on similarities in their <strong>subscriber bases</strong>. </p>
|
||
<h4><a class="anchor" name="accent-colors" href="#accent-colors"><i class="anchor-icon"></i></a><a href="/api/colors">Accent colors</a></h4>
|
||
<p>Telegram users and channels can change the accent color and background pattern of their profile page and their messages!</p>
|
||
<h4><a class="anchor" name="privacy-settings" href="#privacy-settings"><i class="anchor-icon"></i></a><a href="/api/privacy">Privacy settings</a></h4>
|
||
<p>Telegram allows users to specify granular privacy settings, choosing which users can or can't interact with them in certain ways.</p>
|
||
<h4><a class="anchor" name="search-amp-filters" href="#search-amp-filters"><i class="anchor-icon"></i></a><a href="/api/search">Search & filters</a></h4>
|
||
<p>Telegram allows applying detailed message filters while looking for messages in chats.<br>This allows the server to filter messages based on a text query, and even on their type, and this feature is often used by graphical clients to implement features like the chat gallery, chat profile pictures and more.</p>
|
||
<h4><a class="anchor" name="polls" href="#polls"><i class="anchor-icon"></i></a><a href="/api/poll">Polls</a></h4>
|
||
<p>Telegram allows sending polls and quizzes, that can be voted on by thousands, if not millions of users in chats and channels.</p>
|
||
<h4><a class="anchor" name="reactions" href="#reactions"><i class="anchor-icon"></i></a><a href="/api/reactions">Reactions</a></h4>
|
||
<p>Telegram allows users to react on any message using specific emojis, triggering cute lottie animations. </p>
|
||
<h4><a class="anchor" name="animated-message-effects" href="#animated-message-effects"><i class="anchor-icon"></i></a><a href="/api/effects">Animated message effects</a></h4>
|
||
<p>Telegram allows adding spectacular animated effects to messages you send. </p>
|
||
<h4><a class="anchor" name="emoji-categories" href="#emoji-categories"><i class="anchor-icon"></i></a><a href="/api/emoji-categories">Emoji categories</a></h4>
|
||
<p>Sticker, custom emoji and GIF selection UIs should offer a list of categories to quickly filter results by a (list of) emojis, or by some other criteria. </p>
|
||
<h4><a class="anchor" name="emoji-status" href="#emoji-status"><i class="anchor-icon"></i></a><a href="/api/emoji-status">Emoji status</a></h4>
|
||
<p>Telegram allows users to set an emoticon or a <a href="/api/custom-emoji">custom emoji</a> as status, to show next to their name in chats and profiles.</p>
|
||
<h4><a class="anchor" name="invite-links-and-join-requests" href="#invite-links-and-join-requests"><i class="anchor-icon"></i></a><a href="/api/invites">Invite links and join requests</a></h4>
|
||
<p>Channels, basic groups and supergroups may have a public username or a private invite link: private invite links may be further enhanced with per-user join requests.</p>
|
||
<h4><a class="anchor" name="admin-banned-and-default-rights-for-channels-supergroups-and-gro" href="#admin-banned-and-default-rights-for-channels-supergroups-and-gro"><i class="anchor-icon"></i></a><a href="/api/rights">Admin, banned and default rights for channels, supergroups and groups</a></h4>
|
||
<p>How to handle admin permissions, granular bans and global permissions in channels, groups and supergroups.</p>
|
||
<h4><a class="anchor" name="discussion-groups" href="#discussion-groups"><i class="anchor-icon"></i></a><a href="/api/discussion">Discussion groups</a></h4>
|
||
<p><a href="/api/channel">Groups</a> can be associated to a <a href="/api/channel">channel</a> as a <a href="https://telegram.org/blog/privacy-discussions-web-bots">discussion group</a>, to allow users to discuss about posts. </p>
|
||
<h4><a class="anchor" name="channel-comments-and-message-threads" href="#channel-comments-and-message-threads"><i class="anchor-icon"></i></a><a href="/api/threads">Channel comments and message threads</a></h4>
|
||
<p>Telegram allows commenting on a <a href="/api/channel">channel post</a> or on a generic <a href="/api/channel">group message</a>, thanks to message threads.</p>
|
||
<h4><a class="anchor" name="admin-log" href="#admin-log"><i class="anchor-icon"></i></a><a href="/api/recent-actions">Admin log</a></h4>
|
||
<p>Both supergroups and channels offer a so-called <a href="https://telegram.org/blog/admin-revolution">admin log</a>, a log of recent relevant supergroup and channel actions, like the modification of group/channel settings or information on behalf of an admin, user kicks and bans, and more. </p>
|
||
<h4><a class="anchor" name="pinned-messages" href="#pinned-messages"><i class="anchor-icon"></i></a><a href="/api/pin">Pinned messages</a></h4>
|
||
<p>Telegram allows pinning multiple messages on top of a specific chat. </p>
|
||
<h4><a class="anchor" name="mentions" href="#mentions"><i class="anchor-icon"></i></a><a href="/api/mentions">Mentions</a></h4>
|
||
<p>Telegram allows mentioning other users in case of urgent duckling matters, and quickly navigating to those mentions in order to read them as swiftly as possible.</p>
|
||
<h4><a class="anchor" name="scheduled-messages" href="#scheduled-messages"><i class="anchor-icon"></i></a><a href="/api/scheduled-messages">Scheduled messages</a></h4>
|
||
<p>Telegram allows scheduling messages.</p>
|
||
<h4><a class="anchor" name="live-geolocations" href="#live-geolocations"><i class="anchor-icon"></i></a><a href="/api/live-location">Live geolocations</a></h4>
|
||
<p>Telegram allows sending the live geolocation of a user in a chat, optionally setting a proximity alert. </p>
|
||
<h3><a class="anchor" name="peer-database" href="#peer-database"><i class="anchor-icon"></i></a><a href="/api/peers">Peer database</a></h3>
|
||
<p>How to work with peer information in the API.</p>
|
||
<h4><a class="anchor" name="min-constructors" href="#min-constructors"><i class="anchor-icon"></i></a><a href="/api/min">Min constructors</a></h4>
|
||
<p>Sometimes, <a href="/constructor/user">user</a> and <a href="/constructor/channel">channel</a> constructors met in group chat updates may not contain full info about the user: how to handle such constructors.</p>
|
||
<h4><a class="anchor" name="account-deletion" href="#account-deletion"><i class="anchor-icon"></i></a><a href="/api/account-deletion">Account deletion</a></h4>
|
||
<p>How to delete a Telegram account. </p>
|
||
<h4><a class="anchor" name="imported-messages" href="#imported-messages"><i class="anchor-icon"></i></a><a href="/api/import">Imported messages</a></h4>
|
||
<p>Telegram allows importing messages and media from foreign chat apps.</p>
|
||
<h4><a class="anchor" name="telegram-passport" href="#telegram-passport"><i class="anchor-icon"></i></a><a href="/api/passport">Telegram Passport</a></h4>
|
||
<p>How to work with <a href="/api/passport">Telegram Passport</a> directly using the MTProto API.</p>
|
||
<h4><a class="anchor" name="telegram-payments" href="#telegram-payments"><i class="anchor-icon"></i></a><a href="/api/payments">Telegram Payments</a></h4>
|
||
<p>How to work with Telegram Payments directly using the MTProto API.</p>
|
||
<h4><a class="anchor" name="styled-text-with-message-entities" href="#styled-text-with-message-entities"><i class="anchor-icon"></i></a><a href="/api/entities">Styled text with message entities</a></h4>
|
||
<p>How to create styled text with message entities</p>
|
||
<h4><a class="anchor" name="working-with-gifs" href="#working-with-gifs"><i class="anchor-icon"></i></a><a href="/api/gifs">Working with GIFs</a></h4>
|
||
<p>Telegram clients support displaying GIFs.</p>
|
||
<h4><a class="anchor" name="working-with-stickers" href="#working-with-stickers"><i class="anchor-icon"></i></a><a href="/api/stickers">Working with stickers</a></h4>
|
||
<p>Telegram clients support displaying animated, static and video stickers.</p>
|
||
<h4><a class="anchor" name="working-with-custom-emojis" href="#working-with-custom-emojis"><i class="anchor-icon"></i></a><a href="/api/custom-emoji">Working with custom emojis</a></h4>
|
||
<p>Telegram allows including custom animated, static and video emojis directly inside of messages.</p>
|
||
<h4><a class="anchor" name="working-with-animated-emojis" href="#working-with-animated-emojis"><i class="anchor-icon"></i></a><a href="/api/animated-emojis">Working with animated emojis</a></h4>
|
||
<p>Graphical telegram clients should transform emojis into their respective animated version. </p>
|
||
<h4><a class="anchor" name="working-with-animated-dice" href="#working-with-animated-dice"><i class="anchor-icon"></i></a><a href="/api/dice">Working with animated dice</a></h4>
|
||
<p>Telegram supports sending <a href="https://telegram.org/blog/folders#and-one-more-thing">animated dice</a> emojis. </p>
|
||
<h4><a class="anchor" name="message-drafts" href="#message-drafts"><i class="anchor-icon"></i></a><a href="/api/drafts">Message drafts</a></h4>
|
||
<p>How to handle message drafts</p>
|
||
<h4><a class="anchor" name="folders" href="#folders"><i class="anchor-icon"></i></a><a href="/api/folders">Folders</a></h4>
|
||
<p>Working with folders</p>
|
||
<h4><a class="anchor" name="top-peer-rating" href="#top-peer-rating"><i class="anchor-icon"></i></a><a href="/api/top-rating">Top peer rating</a></h4>
|
||
<p>If <a href="/method/contacts.toggleTopPeers">enabled</a>, the rating of <a href="/constructor/topPeer">top peers</a> indicates the relevance of a frequently used peer in a certain <a href="/type/TopPeerCategory">category</a> (frequently messaged users, frequently used bots, inline bots, frequently visited channels and so on).</p>
|
||
<h4><a class="anchor" name="handling-file-references" href="#handling-file-references"><i class="anchor-icon"></i></a><a href="/api/file_reference">Handling file references</a></h4>
|
||
<p>How to handle file references.</p>
|
||
<h4><a class="anchor" name="seamless-telegram-login" href="#seamless-telegram-login"><i class="anchor-icon"></i></a><a href="/api/url-authorization">Seamless Telegram Login</a></h4>
|
||
<p>Handle Seamless Telegram Login URL authorization requests.</p>
|
||
<h4><a class="anchor" name="wallpapers" href="#wallpapers"><i class="anchor-icon"></i></a><a href="/api/wallpapers">Wallpapers</a></h4>
|
||
<p>How to work with chat backgrounds.</p>
|
||
<h4><a class="anchor" name="notification-sounds" href="#notification-sounds"><i class="anchor-icon"></i></a><a href="/api/ringtones">Notification sounds</a></h4>
|
||
<p>How to work with chat notification sounds.</p>
|
||
<h4><a class="anchor" name="message-transcription" href="#message-transcription"><i class="anchor-icon"></i></a><a href="/api/transcribe">Message transcription</a></h4>
|
||
<p>How to transcribe voice messages.</p>
|
||
<h4><a class="anchor" name="message-translation" href="#message-translation"><i class="anchor-icon"></i></a><a href="/api/translation">Message translation</a></h4>
|
||
<p>Telegram allows translating chat messages, and <a href="/api/premium">Telegram Premium</a> users may even enable real-time chat translation. </p>
|
||
<h4><a class="anchor" name="native-antispam-system" href="#native-antispam-system"><i class="anchor-icon"></i></a><a href="/api/antispam">Native antispam system</a></h4>
|
||
<p>Admins of supergroups with a certain number of members can choose to unleash the full proactive power of Telegram's own antispam algorithms – turning on the new Aggressive mode for the automated spam filters.</p>
|
||
<h4><a class="anchor" name="collectibles" href="#collectibles"><i class="anchor-icon"></i></a><a href="/api/fragment">Collectibles</a></h4>
|
||
<p>Telegram users can make it easy for others to contact them or find their public groups and channels via <a href="https://telegram.org/faq#usernames-and-t-me">usernames</a>: clients can also assign multiple <a href="https://fragment.com">Fragment »</a> <strong>collectible usernames</strong> to accounts, supergroups and channels they own; <a href="https://fragment.com">Fragment »</a> also allows purchasing phone number collectibles that can be used to register Telegram accounts. </p>
|
||
<h4><a class="anchor" name="telegram-premium" href="#telegram-premium"><i class="anchor-icon"></i></a><a href="/api/premium">Telegram Premium</a></h4>
|
||
<p>Telegram Premium is an optional subscription service that unlocks additional exclusive client-side and API-side features, while helping support the development of the app. It is a part of Telegram’s <strong>sustainable monetization</strong> – driven by our users, rather than advertisers or shareholders. This way, Telegram can remain independent and prioritize its users first. </p>
|
||
<h4><a class="anchor" name="telegram-business" href="#telegram-business"><i class="anchor-icon"></i></a><a href="/api/business">Telegram Business</a></h4>
|
||
<p>Users can turn their Telegram account into a <strong>business account</strong>, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start page, chatbot support, and more.</p>
|
||
<p>For the moment, all Telegram Business features are available for free to <a href="/api/premium">Telegram Premium</a> subscribers. </p>
|
||
<h4><a class="anchor" name="telegram-stars" href="#telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
|
||
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more. </p>
|
||
<h4><a class="anchor" name="paid-media" href="#paid-media"><i class="anchor-icon"></i></a><a href="/api/paid-media">Paid media</a></h4>
|
||
<p>Content creators can accept <a href="/api/stars">Stars</a> by publishing <strong>paid photos or videos</strong> on their channels. Subscribers will be allowed to view such posts only after paying the author to unlock them. </p>
|
||
<h4><a class="anchor" name="channel-and-supergroup-boosts" href="#channel-and-supergroup-boosts"><i class="anchor-icon"></i></a><a href="/api/boost">Channel and supergroup boosts</a></h4>
|
||
<p><a href="/api/premium">Telegram Premium</a> users can grant their favorite channels additional features like the ability to post <a href="/api/stories">stories</a> by giving them <strong>boosts</strong>. </p>
|
||
<h4><a class="anchor" name="giveaways-amp-gifts" href="#giveaways-amp-gifts"><i class="anchor-icon"></i></a><a href="/api/giveaways">Giveaways & gifts</a></h4>
|
||
<p>Telegram <a href="/api/channel">channel</a> administrators may launch giveaways to randomly distribute <a href="/api/premium">Telegram Premium</a> subscriptions and other gifts among their followers, in exchange for <a href="/api/boost">boosts</a>.</p>
|
||
<h4><a class="anchor" name="action-bar" href="#action-bar"><i class="anchor-icon"></i></a><a href="/api/action-bar">Action bar</a></h4>
|
||
<p>Sometimes, when interacting with Telegram users via private or secret chats, an action bar must be shown on top of the chat, offering convenient action buttons or notices regarding the user.</p>
|
||
<h4><a class="anchor" name="saved-messages" href="#saved-messages"><i class="anchor-icon"></i></a><a href="/api/saved-messages">Saved messages</a></h4>
|
||
<p>The Saved Messages chat allows users to bookmark messages and media: it's a personal cloud storage for any messages or media you may want to send or forward there. </p>
|
||
<h4><a class="anchor" name="profile" href="#profile"><i class="anchor-icon"></i></a><a href="/api/profile">Profile</a></h4>
|
||
<p>Telegram offers many customization options for your profile!</p>
|
||
<h4><a class="anchor" name="themes" href="#themes"><i class="anchor-icon"></i></a><a href="/api/themes">Themes</a></h4>
|
||
<p>Telegram apps support generating, sharing and synchronizing app themes.</p>
|
||
<h3><a class="anchor" name="sponsored-messages" href="#sponsored-messages"><i class="anchor-icon"></i></a><a href="/api/sponsored-messages">Sponsored messages</a></h3>
|
||
<p>If your app allows accessing content from Telegram <a href="https://telegram.org/tour/channels">channels</a>, you must include support for <a href="https://core.telegram.org/api/sponsored-messages">official sponsored messages</a> in Telegram channels. </p>
|
||
<h3><a class="anchor" name="channel-ad-revenue" href="#channel-ad-revenue"><i class="anchor-icon"></i></a><a href="/api/revenue">Channel ad revenue</a></h3>
|
||
<p>Telegram has one of the <strong>most generous reward systems</strong> in the history of social media. Telegram channel owners can now receive <strong>50%</strong> of the revenue from ads displayed in their channels.</p>
|
||
<p>This page describes the methods used to withdraw channel ad revenue, as well as view detailed revenue stats. </p>
|
||
<h3><a class="anchor" name="fact-checks" href="#fact-checks"><i class="anchor-icon"></i></a><a href="/api/factcheck">Fact-checks</a></h3>
|
||
<p>Telegram clients support displaying fact-checks added to messages by independent fact-checkers.</p>
|
||
<h3><a class="anchor" name="contacts" href="#contacts"><i class="anchor-icon"></i></a><a href="/api/contacts">Contacts</a></h3>
|
||
<p>Working with contacts in the API.</p>
|
||
<h3><a class="anchor" name="blocklist" href="#blocklist"><i class="anchor-icon"></i></a><a href="/api/block">Blocklist</a></h3>
|
||
<p>Working with the blocklist.</p>
|
||
<h3><a class="anchor" name="nearby-users-ampchats" href="#nearby-users-ampchats"><i class="anchor-icon"></i></a><a href="/api/nearby">Nearby users&chats</a></h3>
|
||
<p>How to work with geolocation-based features like geochats and the nearby users feature.</p>
|
||
<h4><a class="anchor" name="web-events" href="#web-events"><i class="anchor-icon"></i></a><a href="/api/web-events">Web events</a></h4>
|
||
<p>When interacting with HTML5 games and the websites of payment gateways, Telegram apps should expose the following JS APIs.</p>
|
||
<h4><a class="anchor" name="deep-links" href="#deep-links"><i class="anchor-icon"></i></a><a href="/api/links">Deep links</a></h4>
|
||
<p>Telegram clients must handle special <code>tg://</code> and <code>t.me</code> deep links encountered in messages, link entities and in other apps by registering OS handlers. </p>
|
||
<h4><a class="anchor" name="takeout" href="#takeout"><i class="anchor-icon"></i></a><a href="/api/takeout">Takeout</a></h4>
|
||
<p>Telegram's API allows users to export all of their information through the takeout API.</p>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
<div class="footer_wrap">
|
||
<div class="footer_columns_wrap footer_desktop">
|
||
<div class="footer_column footer_column_telegram">
|
||
<h5>Telegram</h5>
|
||
<div class="footer_telegram_description"></div>
|
||
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
|
||
</div>
|
||
|
||
<div class="footer_column">
|
||
<h5><a href="//telegram.org/faq">About</a></h5>
|
||
<ul>
|
||
<li><a href="//telegram.org/faq">FAQ</a></li>
|
||
<li><a href="//telegram.org/privacy">Privacy</a></li>
|
||
<li><a href="//telegram.org/press">Press</a></li>
|
||
</ul>
|
||
</div>
|
||
<div class="footer_column">
|
||
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
|
||
<ul>
|
||
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
|
||
<li><a href="//telegram.org/android">Android</a></li>
|
||
<li><a href="//telegram.org/dl/web">Mobile Web</a></li>
|
||
</ul>
|
||
</div>
|
||
<div class="footer_column">
|
||
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
|
||
<ul>
|
||
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
|
||
<li><a href="//macos.telegram.org/">macOS</a></li>
|
||
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
|
||
</ul>
|
||
</div>
|
||
<div class="footer_column footer_column_platform">
|
||
<h5><a href="/">Platform</a></h5>
|
||
<ul>
|
||
<li><a href="/api">API</a></li>
|
||
<li><a href="//translations.telegram.org/">Translations</a></li>
|
||
<li><a href="//instantview.telegram.org/">Instant View</a></li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
<div class="footer_columns_wrap footer_mobile">
|
||
<div class="footer_column">
|
||
<h5><a href="//telegram.org/faq">About</a></h5>
|
||
</div>
|
||
<div class="footer_column">
|
||
<h5><a href="//telegram.org/blog">Blog</a></h5>
|
||
</div>
|
||
<div class="footer_column">
|
||
<h5><a href="//telegram.org/apps">Apps</a></h5>
|
||
</div>
|
||
<div class="footer_column">
|
||
<h5><a href="/">Platform</a></h5>
|
||
</div>
|
||
<div class="footer_column">
|
||
<h5><a href="//telegram.org/press">Press</a></h5>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<script src="/js/main.js?47"></script>
|
||
|
||
<script>backToTopInit("Go up");
|
||
removePreloadInit();
|
||
</script>
|
||
</body>
|
||
</html>
|
||
|