CINXE.COM
Collectibles
<!DOCTYPE html> <html class=""> <head> <meta charset="utf-8"> <title>Collectibles</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta property="description" content="Telegram users can make it easy for others to contact them or find their public groups and channels via usernames: clients can also assign multiple Fragment &raquo; collectible usernames to accounts, supergroups and channels they own; Fragment &raquo; also allows purchasing phone number collectibles that can be used to register Telegram accounts."> <meta property="og:title" content="Collectibles"> <meta property="og:image" content=""> <meta property="og:description" content="Telegram users can make it easy for others to contact them or find their public groups and channels via usernames: clients can also assign multiple Fragment &raquo; collectible usernames to accounts, supergroups and channels they own; Fragment &raquo; also allows purchasing phone number collectibles that can be used to register Telegram accounts."> <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"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/fragment" >Collectibles</a></li></ul></div> <h1 id="dev_page_title">Collectibles</h1> <div id="dev_page_content"><!-- scroll_nav --> <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> <h3><a class="anchor" href="#collectible-usernames" id="collectible-usernames" name="collectible-usernames"><i class="anchor-icon"></i></a>Collectible usernames</h3> <p>Schema:</p> <pre><code><a href='/constructor/username'>username</a>#b4073647 flags:<a href='/type/%23'>#</a> editable:flags.0?<a href='/constructor/true'>true</a> active:flags.1?<a href='/constructor/true'>true</a> username:<a href='/type/string'>string</a> = <a href='/type/Username'>Username</a>; <a href='/constructor/updateUserName'>updateUserName</a>#a7848924 user_id:<a href='/type/long'>long</a> first_name:<a href='/type/string'>string</a> last_name:<a href='/type/string'>string</a> usernames:<a href='/type/Vector%20t'>Vector</a><<a href='/type/Username'>Username</a>> = <a href='/type/Update'>Update</a>; <a href='/constructor/user'>user</a>#83314fca flags:<a href='/type/%23'>#</a> self:flags.10?<a href='/constructor/true'>true</a> contact:flags.11?<a href='/constructor/true'>true</a> mutual_contact:flags.12?<a href='/constructor/true'>true</a> deleted:flags.13?<a href='/constructor/true'>true</a> bot:flags.14?<a href='/constructor/true'>true</a> bot_chat_history:flags.15?<a href='/constructor/true'>true</a> bot_nochats:flags.16?<a href='/constructor/true'>true</a> verified:flags.17?<a href='/constructor/true'>true</a> restricted:flags.18?<a href='/constructor/true'>true</a> min:flags.20?<a href='/constructor/true'>true</a> bot_inline_geo:flags.21?<a href='/constructor/true'>true</a> support:flags.23?<a href='/constructor/true'>true</a> scam:flags.24?<a href='/constructor/true'>true</a> apply_min_photo:flags.25?<a href='/constructor/true'>true</a> fake:flags.26?<a href='/constructor/true'>true</a> bot_attach_menu:flags.27?<a href='/constructor/true'>true</a> premium:flags.28?<a href='/constructor/true'>true</a> attach_menu_enabled:flags.29?<a href='/constructor/true'>true</a> flags2:<a href='/type/%23'>#</a> bot_can_edit:flags2.1?<a href='/constructor/true'>true</a> close_friend:flags2.2?<a href='/constructor/true'>true</a> stories_hidden:flags2.3?<a href='/constructor/true'>true</a> stories_unavailable:flags2.4?<a href='/constructor/true'>true</a> contact_require_premium:flags2.10?<a href='/constructor/true'>true</a> bot_business:flags2.11?<a href='/constructor/true'>true</a> bot_has_main_app:flags2.13?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> access_hash:flags.0?<a href='/type/long'>long</a> first_name:flags.1?<a href='/type/string'>string</a> last_name:flags.2?<a href='/type/string'>string</a> username:flags.3?<a href='/type/string'>string</a> phone:flags.4?<a href='/type/string'>string</a> photo:flags.5?<a href='/type/UserProfilePhoto'>UserProfilePhoto</a> status:flags.6?<a href='/type/UserStatus'>UserStatus</a> bot_info_version:flags.14?<a href='/type/int'>int</a> restriction_reason:flags.18?<a href='/type/Vector%20t'>Vector</a><<a href='/type/RestrictionReason'>RestrictionReason</a>> bot_inline_placeholder:flags.19?<a href='/type/string'>string</a> lang_code:flags.22?<a href='/type/string'>string</a> emoji_status:flags.30?<a href='/type/EmojiStatus'>EmojiStatus</a> usernames:flags2.0?<a href='/type/Vector%20t'>Vector</a><<a href='/type/Username'>Username</a>> stories_max_id:flags2.5?<a href='/type/int'>int</a> color:flags2.8?<a href='/type/PeerColor'>PeerColor</a> profile_color:flags2.9?<a href='/type/PeerColor'>PeerColor</a> bot_active_users:flags2.12?<a href='/type/int'>int</a> = <a href='/type/User'>User</a>; <a href='/constructor/channel'>channel</a>#aadfc8f flags:<a href='/type/%23'>#</a> creator:flags.0?<a href='/constructor/true'>true</a> left:flags.2?<a href='/constructor/true'>true</a> broadcast:flags.5?<a href='/constructor/true'>true</a> verified:flags.7?<a href='/constructor/true'>true</a> megagroup:flags.8?<a href='/constructor/true'>true</a> restricted:flags.9?<a href='/constructor/true'>true</a> signatures:flags.11?<a href='/constructor/true'>true</a> min:flags.12?<a href='/constructor/true'>true</a> scam:flags.19?<a href='/constructor/true'>true</a> has_link:flags.20?<a href='/constructor/true'>true</a> has_geo:flags.21?<a href='/constructor/true'>true</a> slowmode_enabled:flags.22?<a href='/constructor/true'>true</a> call_active:flags.23?<a href='/constructor/true'>true</a> call_not_empty:flags.24?<a href='/constructor/true'>true</a> fake:flags.25?<a href='/constructor/true'>true</a> gigagroup:flags.26?<a href='/constructor/true'>true</a> noforwards:flags.27?<a href='/constructor/true'>true</a> join_to_send:flags.28?<a href='/constructor/true'>true</a> join_request:flags.29?<a href='/constructor/true'>true</a> forum:flags.30?<a href='/constructor/true'>true</a> flags2:<a href='/type/%23'>#</a> stories_hidden:flags2.1?<a href='/constructor/true'>true</a> stories_hidden_min:flags2.2?<a href='/constructor/true'>true</a> stories_unavailable:flags2.3?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> access_hash:flags.13?<a href='/type/long'>long</a> title:<a href='/type/string'>string</a> username:flags.6?<a href='/type/string'>string</a> photo:<a href='/type/ChatPhoto'>ChatPhoto</a> date:<a href='/type/int'>int</a> restriction_reason:flags.9?<a href='/type/Vector%20t'>Vector</a><<a href='/type/RestrictionReason'>RestrictionReason</a>> admin_rights:flags.14?<a href='/type/ChatAdminRights'>ChatAdminRights</a> banned_rights:flags.15?<a href='/type/ChatBannedRights'>ChatBannedRights</a> default_banned_rights:flags.18?<a href='/type/ChatBannedRights'>ChatBannedRights</a> participants_count:flags.17?<a href='/type/int'>int</a> usernames:flags2.0?<a href='/type/Vector%20t'>Vector</a><<a href='/type/Username'>Username</a>> stories_max_id:flags2.4?<a href='/type/int'>int</a> color:flags2.7?<a href='/type/PeerColor'>PeerColor</a> profile_color:flags2.8?<a href='/type/PeerColor'>PeerColor</a> emoji_status:flags2.9?<a href='/type/EmojiStatus'>EmojiStatus</a> level:flags2.10?<a href='/type/int'>int</a> = <a href='/type/Chat'>Chat</a>; ---functions--- <a href='/method/account.toggleUsername'>account.toggleUsername</a>#58d6b376 username:<a href='/type/string'>string</a> active:<a href='/type/Bool'>Bool</a> = <a href='/type/Bool'>Bool</a>; <a href='/method/account.reorderUsernames'>account.reorderUsernames</a>#ef500eab order:<a href='/type/Vector%20t'>Vector</a><<a href='/type/string'>string</a>> = <a href='/type/Bool'>Bool</a>; <a href='/method/bots.reorderUsernames'>bots.reorderUsernames</a>#9709b1c2 bot:<a href='/type/InputUser'>InputUser</a> order:<a href='/type/Vector%20t'>Vector</a><<a href='/type/string'>string</a>> = <a href='/type/Bool'>Bool</a>; <a href='/method/bots.toggleUsername'>bots.toggleUsername</a>#053ca973 bot:<a href='/type/InputUser'>InputUser</a> username:<a href='/type/string'>string</a> active:<a href='/type/Bool'>Bool</a> = <a href='/type/Bool'>Bool</a>; <a href='/method/channels.toggleUsername'>channels.toggleUsername</a>#50f24105 channel:<a href='/type/InputChannel'>InputChannel</a> username:<a href='/type/string'>string</a> active:<a href='/type/Bool'>Bool</a> = <a href='/type/Bool'>Bool</a>; <a href='/method/channels.reorderUsernames'>channels.reorderUsernames</a>#b45ced1d channel:<a href='/type/InputChannel'>InputChannel</a> order:<a href='/type/Vector%20t'>Vector</a><<a href='/type/string'>string</a>> = <a href='/type/Bool'>Bool</a>; <a href='/method/channels.deactivateAllUsernames'>channels.deactivateAllUsernames</a>#0a245dd3 channel:<a href='/type/InputChannel'>InputChannel</a> = <a href='/type/Bool'>Bool</a>;</code></pre> <p>Collectible usernames work just like basic <a href="https://t.me/username">@usernames</a>, they appear in Global Search results and have <a href="/api/links#public-username-links">deep links聽禄</a>, just like basic usernames. </p> <p>The ownership of collectible usernames is secured by TON, a fast and scalable blockchain network. They can be bought and sold through the <a href="https://fragment.com">Fragment platform聽禄</a>, giving a simple and secure way to acquire and exchange valuable Telegram domains. </p> <p>On the Fragment platform, clients may associate or dissociate purchased collectible usernames either to their Telegram account, or to a bot/channel/supergroup they own. </p> <p>If any collectible username is associated to an account, channel or supergroup, <a href="/constructor/user">user</a>.<code>username</code> and <a href="/constructor/channel">channel</a>.<code>username</code> won't be set, and <a href="/constructor/user">user</a>.<code>usernames</code> and <a href="/constructor/channel">channel</a>.<code>usernames</code> will be set, instead: these fields contain an array of <a href="/constructor/username">username</a> constructors, which indicate whether a certain username is a basic username (<code>editable</code> is set) or a collectible username (<code>editable</code> is not set); and whether a collectible username is <code>active</code> or not.<br> The first username in the <code>usernames</code> vector must be shown in-UI as the main username.</p> <p>Immediately after association, a username is marked as not <code>active</code> (i.e. only the owner can see it in the <code>usernames</code> list): use <a href="/method/account.toggleUsername">account.toggleUsername</a>, <a href="/method/bots.toggleUsername">bots.toggleUsername</a> or <a href="/method/channels.toggleUsername">channels.toggleUsername</a> to mark it as active.<br> Note that you can't mark as inactive the basic (non-collectible) username, if any. </p> <p><a href="/method/channels.deactivateAllUsernames">channels.deactivateAllUsernames</a> may also be used to mark as inactive all collectible usernames associated to a certain supergroup or channel: useful for example when making a group or channel private, by first invoking <a href="/method/channels.updateUsername">channels.updateUsername</a> with an empty username to remove the editable username (if present), and then invoking this method to remove all associated collectible usernames. </p> <p>Use <a href="/method/account.reorderUsernames">account.reorderUsernames</a>/<a href="/method/bots.reorderUsernames">bots.reorderUsernames</a>/<a href="/method/channels.reorderUsernames">channels.reorderUsernames</a> to change the order of the usernames associated to an account, channel or supergroup: all currently active usernames must be specified. </p> <h3><a class="anchor" href="#collectible-phone-numbers" id="collectible-phone-numbers" name="collectible-phone-numbers"><i class="anchor-icon"></i></a>Collectible phone numbers</h3> <p><a href="https://fragment.com">Fragment</a> collectible phone numbers can only be used to create Telegram accounts, using the usual <a href="/api/auth">sign up/login flow聽禄</a>.</p> <h3><a class="anchor" href="#fetching-info-about-fragment-collectibles" id="fetching-info-about-fragment-collectibles" name="fetching-info-about-fragment-collectibles"><i class="anchor-icon"></i></a>Fetching info about Fragment collectibles</h3> <p>Schema:</p> <pre><code><a href='/constructor/inputCollectibleUsername'>inputCollectibleUsername</a>#e39460a9 username:<a href='/type/string'>string</a> = <a href='/type/InputCollectible'>InputCollectible</a>; <a href='/constructor/inputCollectiblePhone'>inputCollectiblePhone</a>#a2e214a4 phone:<a href='/type/string'>string</a> = <a href='/type/InputCollectible'>InputCollectible</a>; <a href='/constructor/fragment.collectibleInfo'>fragment.collectibleInfo</a>#6ebdff91 purchase_date:<a href='/type/int'>int</a> currency:<a href='/type/string'>string</a> amount:<a href='/type/long'>long</a> crypto_currency:<a href='/type/string'>string</a> crypto_amount:<a href='/type/long'>long</a> url:<a href='/type/string'>string</a> = <a href='/type/fragment.CollectibleInfo'>fragment.CollectibleInfo</a>; ---functions--- <a href='/method/fragment.getCollectibleInfo'>fragment.getCollectibleInfo</a>#be1e85ba collectible:<a href='/type/InputCollectible'>InputCollectible</a> = <a href='/type/fragment.CollectibleInfo'>fragment.CollectibleInfo</a>;</code></pre> <p><a href="/method/fragment.getCollectibleInfo">fragment.getCollectibleInfo</a> may be used to fetch info about <a href="https://fragment.com">Fragment</a> collectible owned by us or other users (i.e. the purchase date & price). </p> <p>The collectible must be visible to the current user, for example it can be a Fragment user/phone number collectible we own, or a Fragment username that another user has enabled on their account, or another user's Fragment phone number that we can see thanks to the owner's <a href="/api/privacy">privacy settings</a>.</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 src="/js/jquery.min.js?1"></script> <script src="/js/bootstrap.min.js?1"></script> <script>window.initDevPageNav&&initDevPageNav(); backToTopInit("Go up"); removePreloadInit(); </script> </body> </html> <!-- page generated in 9.65ms -->