TDLib – Build Your Own Telegram

Telegram offers developers more than just the Bot API. Since day one, we've also had a free and open Telegram API that allows anyone to create their own messaging apps operating in the Telegram cloud. These apps openly compete with the official ones and some of them have now reached more than 10 million downloads on Google Play.

Users of these alternative clients can communicate with anyone on Telegram, but the apps often offer experimental, highly specialized or locally flavored features. Today we are introducing a new tool for third-party developers that will make it even easier to build fast, secure and feature-rich Telegram apps on our platform.

Introducing TDLib

Meet TDLib – the Telegram Database Library. TDLib takes care of all network implementation details, encryption and local data storage, so that developers can dedicate more time to design, responsive interfaces and beautiful animations.

Universally useful

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 compatible with any programming language that can execute C functions; it also has native bindings to Java and C#.

Open and well-documented

All TDLib API methods and public interfaces are fully documented. The code is, of course, completely open and available on GitHub.

Secure and reliable

TDLib will remain stable on slow and unreliable Internet connections and guarantees that all updates will be delivered in the correct order. All local data is encrypted using a user-provided encryption key.

Optimized for performance

The library is fully asynchronous and optimized for high performance. We use TDLib in the Telegram Bot API, where each TDLib instance handles more than 18,000 active bots simultaneously.


Our new Android X client is an example of what can be done with TDLib. Using TDLib, it took the developer of the app approximately one year to reproduce all the major features of Telegram for Android – and add plenty of his own.

Let's see what else TDLib will help bring to the Telegram ecosystem this year.

January 31, 2018,
The Telegram Team

P.S. Today, we're also introducing Telegram X for Android, a new official app.
Check out the announcement here »

Themes, Multiple Accounts and More

Happy winter holidays, everyone! To reinforce the festive mood, we‘re updating Telegram for the second time this December, adding features you’ve been asking for.

With version 4.7 for iOS, you can change what your Telegram looks like in the new Appearance settings. Choose between four different themes, including a minimalistic one (“Day”) and two dark themes (“Night” and “Night Blue”). The “Day” theme also allows you to pick an accent color for the entire app, like pink or purple.

Multiple accounts

The Android app already supported multiple themes, so it had to go further with 4.7 by supporting multiple accounts. You can add up to three accounts with different phone numbers to your Telegram app, and then quickly switch between them from the side menu. Notifications will keep coming from all accounts, unless you change this in the Notification settings.

Quick replies

Telegram now supports quick replies on both mobile platforms. To use them, just swipe left on any message in a chat.

In case you missed it…

Telegram 4.6, released earlier this month, introduced new granular settings for auto-downloading media, better link previews, albums in Secret Chats, improved security, and embeds for messages from public groups and channels. Here’s what an embed of a Telegram message looks like when included on a web page:

To get the HTML-code for embedding a message, open its link in a web browser:

Have a happy new year – and stay tuned for the product updates we are going to announce in January.

The Telegram Team,
December 30, 2017

Albums, Saved Messages and Better Search

Starting with Telegram 4.5, whenever you send multiple photos or videos they are grouped into albums. Each album can include up to 10 photos or videos, arranged in the chat as elegantly proportioned thumbnails. They will also result in one notification instead of ten on the recipient’s side.

Photo Order

From now on, you can control the order in which photos are sent. Each photo you choose for sharing will show its sequence number. This makes it easy to double check that your “before-and-after” pics will be sent in the correct order.

Multiple Profile Photos

When viewing a photo from an album, you’ll see other pictures from the same group as thumbnails in the lower part of the screen. Profile photos are now also displayed this way, which makes them much easier to navigate.

Saved Messages

You can now bookmark important messages by quickly forwarding them to Saved Messages – your personal cloud storage for any messages or media you may want to send or forward there. Each saved message has a “go to” button that takes you to the right place in the chat where it was originally posted.

Saved Messages Chat

The Saved Messages chat is always displayed at the top of the list in the sharing and forwarding menus. This makes it easy to save your favorites while keeping things as tidy as before.

Number One in the Sharing Menu

Saved Messages are easy to find: they are accessible both from the Chats list and from the side panel on Android / Settings on iOS.

Improved Search

Speaking of finding things, we’ve upgraded the global search algorithm used for finding public channels, groups and bots. Now you can search for public channels and bots by their titles, and most popular items will always be displayed first.

Pinned Messages in Channels

Channel admins can now pin messages to focus their subscribers’ attention on important announcements. This tool can also come in handy if you want to help new subscribers navigate your channel.

Pinned Message

iOS: New Settings, iPhone X Support

Telegram 4.5 comes packed with goodies for iOS users. The Settings screen and the context menu in chats got a makeover. Version 4.5 also works great on iPhone X.

Redesigned Settings

Edit Settings

And that’s it for today. We hope you enjoy these new features while we’re working on the next update!

November 15, 2017
The Telegram Team

Live Locations, Media Player and Languages

Starting with Telegram 4.4, you can broadcast your current location to any chat in real time.

This is useful when you are on your way to an appointment or are trying to coordinate with friends at a large event. Instead of sending static locations on the map every minute, you can now share your Live Location with the people you’re meeting – for 15 minutes, 1 hour, or 8 hours.

To use this feature, select ‘Location’ from the attachment menu and choose ‘Share My Location for…’:

You can also share your Live Location in groups, and if other members of the group do the same, you’ll get an interactive map of everyone’s current coordinates. Thanks to a bar at the top of the screen, you will always remember who you’re sharing your location with. And you only need two taps to stop sharing whenever you choose to.

New Media Player

We’ve completely redesigned our in-app audio player to better support the playback of MP3s and other music files you send and receive. Try the @cctracks channel for a demo – we’ve uploaded some free music there to demonstrate how the new media player works. After downloading an audio file, tap the play button to start listening. To view the cover image and the rest of the chat's playlist, tap on the title of the playing track in the top bar.

More Languages

We’re also launching a new translation platform for Telegram apps. Starting today, Telegram is available in French, Indonesian, Malay, Russian and Ukrainian – with more languages like Persian coming soon. Telegram now supports 13 languages, which are available in Settings.

If you don’t like how a specific element in Telegram's interface is translated in your language, you can now use the localization platform to suggest an alternative word or phrase. Everyone can suggest translations and vote for them, making Telegram localization a community-driven effort.

Screenshots make translations easier

Unlike other services, Telegram can instantly push new translations of words and phrases to the apps. Thanks to this, users won't need to wait for an update in the stores to get the new localized version.

This also means that our developers won't have to wait for all translations to be finished before the apps are released, so this new interface will speed up Telegram development too.

Better Group Chats

As always, we’re trying to make Telegram group chats better. In large groups, you can now recognize messages from admins by the new ‘admin’ badge. And Admins in supergroups can now control whether new members get to see the earlier message history.

October 10, 2017
The Telegram Team

Better Replies, Stickers & Invitations

Since 2015 when we first introduced replies, the maximum group size on Telegram has increased by 100 times – from 200 max members to 20,000. These days you can get new mentions or replies in group chats many times during a day – and it’s important not to miss those messages.

Starting with Telegram 4.3, whenever somebody replies to you or mentions you in a group, you’ll notice this straight away by the ‘@’ badge in the chats list:

If you have new replies/mentions in a group, you can now instantly reach them by tapping the new ‘@’ button when inside the chat. This button will disappear once you’ve read all the relevant messages.

Favorite Stickers

Anyone can create and upload stickers on Telegram. As a result, thousands of new stickers are added to the platform each day, and some of us have dozens of sticker sets installed.

Starting today, anyone with five or more sticker sets installed can mark individual stickers as ‘favorites’, and have them always accessible at the top of the sticker panel in the ‘star’ section.

Stickers of the Group

Speaking of stickers, large groups with 100 members and more can now choose an official sticker set for all the members of the group to see and use while they're chatting in the group — without the need of adding it to their panels.

Group Stickers

Invite Friends

The ‘Invite Friends’ section (accessible from Contacts) has been completely redesigned. Your contacts that are not on Telegram yet but have many of their friends already using it are now listed at the top. If you invite any of them to join, they’ll be welcomed by tens of Telegram veterans among their contacts:

Invite Friends to Telegram

…And More

As always with new releases, we've included several small goodies you may also like:

  • Twitch videos are now supported in the Telegram in-app player, so you can watch Twitch streams in Picture-in-Picture mode while chatting with your friends.
  • When on a Telegram voice call, you can now check the signal strength thanks to the new indicator.
  • On iOS, you can edit any photo you pasted directly to a chat from clipboard before sending.
  • On Android, when forwarding a message, you can long tap to select multiple recipients.
  • On Android, when viewing photos in Shared Media, you can go to the place in chat where the photo was posted.
  • On Android, if you have many new messages in many active chats, synchronization will happen much, much faster.

Summer is over. Stay tuned, another update is already brewing in our dungeons!

September 3, 2017
The Telegram Team

Instant View Now Available for 2274 Websites

This May, we've launched our Instant View Platform and a $200,000 competition to create templates — sets of instructions that tell our bot how to turn an article on a given website into a slick Instant View page.

Instant View pages load in a blink of an eye and support images, videos, and other media. They also work great even if the source website isn't optimized for mobile devices.

Instant View Button

Instant View Page

Instant View for Everyone!

Today we are launching Instant View for 2,274 more websites thanks to the hard work of our contest winners, who will receive $251,664 as prizes before August, 31.

To get a glimpse of the new world, just send a link from one of the websites on this list via Telegram and you'll see an Instant View button right below. Tap this button to instantly get an elegantly formatted page — no need to wait for your browser to load.

Read more about Instant View »

The contest

This Instant View celebration was made possible by the participants of our first contest — and now it's time to celebrate them. Hundreds of coders from more than 20 countries came together to create a total of 37,507 templates from which our brave admins chose the winning versions.

There was a $100 reward for each template that won for its respective domain and we've also assigned three bonus prizes to those who created the most winning templates. We congratulate the winners and all the participants on their achievements!

The winners

  1. Users Pavel T. and Chuchu shared the first place with 40 winning templates each. The first prize of $10,000 will be split, so that each is getting a bonus of $5,000 in addition to the rewards for their templates.

  2. Yuri Panarin took the second place with 38 templates and earns the silver prize of $5,000.

  3. The user φ came in third with 35 templates and gets the bronze prize of $2,500.

See the full results of the First Instant View Contest »

The results are 100% transparent. You can view all template versions for all websites, inspect any issue and see all the comments and appeals as well as every decision taken by the Telegram admins.

Instant View Feedback

The Web evolves swiftly and all templates will need periodic adjustments to stay up to date. If you see a problem with an Instant View page you're viewing, scroll all the way down to find a link to our @previews bot.

If you report a problem to the bot, he‘ll send it on to the template creator who should be able to fix it. Please note that our heroic template creators don’t work for Telegram and can't help you with general inquires — try our in-app Support for those. (Or, better yet, join the TSF today!)

Moving forward

This contest and the first 2,274 domains are just the beginning. We will extend and upgrade our Instant View Platform based on what we've learned on the first part of this journey — and will launch a new contest in the coming months.

Join our @IVcontest channel to get updates on the IV ecosystem.
And have fun with Instant View!

August 4, 2017
The Instant View Team

Disappearing Media, Your Bio & More Speed

Telegram 4.2 is here! We have completely redesigned our photo editing tools, and it takes you even fewer taps to make your photos look amazing. In addition, you can now set a self-destruct timer for any photos and videos you share in private chats.

If you set a timer, the countdown starts the moment your recipient opens the photo or video you sent. After the time runs out, the photo/video will disappear forever, just like in Secret Chats.

If the recipient tries to make a screenshot of your disappearing media, you’ll get a notification immediately.

Who are you again?

Starting today, you can add a bio to your profile by typing a few words about yourself in Settings. Every time you stumble upon new users in large groups you might want to learn more about them. That's where bios can help.

Bio in your profile

More Speed and Security

On top of this, as of 4.2, Telegram apps will rely on a CDN (distributed network) to cache publicly available photos and videos posted in massive channels (100,000+ members). This will result in significantly higher download speeds for tens of millions of Telegram users around the world. Check out this post to learn more about how we managed to do it in a slick and secure way.

One More Thing

Stickers are now easier to use as you can enlarge the scrolling area. More legroom for your emotions!

July 23, 2017
The Telegram Team

More Speed and Security!

We at Telegram love to build sophisticated technologies that combine speed with security. Starting with Telegram 4.2, we support CDN caching. CDNs are third-party caching nodes that we’ll use to cache publicly available videos and photos posted in massive channels (say, with 100,000+ subscribers) for users in remote locations where Telegram is popular.

This will increase download speeds for tens of millions of users as CDN caching allows data to travel shorter distances and helps avoid bottlenecks that exist between regions.

While these caching nodes are only used to temporarily store public media (imagine Telegram versions of superpopular YouTube hits), all data that goes through them is encrypted with a key unknown to the caching nodes. In other words, we treat these CDN caching nodes just like we treat your internet provider – they only ever get encrypted junk they can't decipher.

Here’s how it works

If you're interested in the technical details, feel free to check out this page that describes the relevant encryption and security checks. And as always – the updated source code for the Telegram apps is open and available for your scrutiny. Security experts are welcome to verify the implementation of CDNs based on the open source code we make available for all of our apps.

Thanks to this technology, the download speed for public photos and videos in places like South America, Turkey, Indonesia, India, Iran or Iraq will significantly increase without the slightest compromise in security.

To sum up

  • Download speeds for popular public media are set to increase several times for millions of Telegram users.
  • CDN caching nodes are not Telegram servers and not part of the Telegram cloud.
  • CDNs are used only for caching popular public media from massive channels. Private data never goes there.
  • CDNs only get encrypted data and they never have the keys: even if they are accessed by hackers or third parties, the attacker won’t be able to decipher the files.
  • Data downloaded from CDN caching nodes is always verified by the receiving Telegram app by way of hash: attackers won’t be able to replace any files with their own versions.
  • Detailed technical info about CDNs can be found here, the updated source code of Telegram apps ready for CDN support can be found here.
  • Telegram 4.2 also includes a bucketful of other goodies for you to enjoy.

Stay safe (and fast)!

July 23, 2017
The Telegram Team

Supergroups 10,000: Admin Tools & More

Just in case you missed that, supergroups can long since have up to 100,000 members.

With Telegram 4.1, we're increasing the maximum size of supergroups to 10,000 members each. That’s a lot of people packed into one group, and now users and admins can use search to find specific users among them:

Search for members

Admins can also search for members in their channels.

With groups as big as 10,000 people – the size of a decent small town – you may be looking for some more powerful management tools. And that’s exactly what Telegram 4.1 gives you.

Admin Rights

You can now add admins with specific sets of privileges to help you run your community. Choose who among your trusted admins will be able to add new users, manage messages, block members, edit group info, or even add new admins.

Admin rights

Partial Bans

Admins who don’t want to completely ban members from their supergroups can now partially restrict their rights in order to stop behavior that's causing problems. You can put nasty users into read-only mode or maybe stop them from sending stickers or media for a certain period of time. Now you can do all of this with absolute precision:

Partial bans

Even robots can get in on the fun. With Bot API version 3.1, you can use admin bots to automatically impose temporary or permanent bans based on member actions. Check out the docs here to start building your robotic police force today.

Recent Admin Actions

When multiple admins are working with one group, it’s easy to get confused about which admin did what and when (or which admin bot has gone Skynet on your members). That’s why we've added a “Recent Actions” section to the admins page. This section stores a log of all service actions taken in the group in the last 48 hours and is visible to admins only.

Recent admin actions

Precise filters

Recent actions in supergroups also show messages that were deleted in the last 48 hours and the original versions of edited messages for the same period, so nasty behavior like self-deleted spam will no longer help anyone escape the admins’ wrath.

Sharing and Android Pay

In other news, Telegram 4.1 for iOS brings you an improved sharing extension. When sharing stuff from other apps to Telegram you can add an optional comment and select multiple recipients easily. 3D Touch on the app icon to see some new actions, including taking a photo/video and sending it to multiple recipients.

New sharing extension

On Android, Telegram 4.1. gets you Android Pay support for Bot Payments and improved media selection – photos and videos are now shown together when sharing from the attachment menu or gallery.

Free speech

This update also features anti-censorship tools such as the ability to set up a Proxy server in the “Data and Storage” section of the Settings.

We believe in free and secure communication. It’s our responsibility to offer technology to defend our users’ right to privacy and freedom of speech around the world.

June 30, 2017
The Telegram Team

Video Messages and Telescope

We know you love the speed and simplicity of voice messages on Telegram. Starting today, you can also send video messages – just as swiftly:

To send a video message, go to any chat on Telegram and tap the mic icon to switch to camera mode. Now all you need to do is tap and hold the camera icon and record a video message. When you’re done, just release the recording button to dispatch your message — and it will arrive in the blink of an eye.

Video messages are so fast because Telegram compresses them and sends them even as you record them. By the way, if holding the button seems like too much work, you can lock the camera in recording mode by swiping up. This also works with voice messages now (here's one for you, cab drivers).

Video messages are automatically downloaded and autoplayed by default (you can change this in Settings if you’re on a data diet though) and generally feel and act like voice messages – on visual steroids.

Picture in Picture

While watching a video message, you can freely browse your other chats – the video will pop up in a corner and continue playing. You can move it around the screen and pause it from anywhere in Telegram. Cool, eh? Well, there's more:

Meet Telescope

Lots of popular folks address their fans via public channels on Telegram. Video messages will make their connection to fans more direct and intimate than ever. But we want to kick this up another notch.

Today we are launching Telescope, a dedicated video hosting platform for those who use videos to communicate with their audiences (here's one for you, blogger people!)

With Telescope, public video messages can go viral beyond the Telegram ecosystem. Telescope hosts autoplayed round videos of up to 1 minute in duration – the same format we use for Telegram video messages. And yes, you heard that right, you don't need a Telegram account to view them.

Every public channel on Telegram now has a URL, such as, where all of its video messages are available to the world wide web and the wide, wide world.

A Telescope Channel

Whenever you post a video message to a public channel, it will also be uploaded to and have a public URL there.

Share Telescope Videos

With Telescope, even those users who don’t have Telegram installed will be able to enjoy your public video messages and share them on Twitter or Facebook. As a result, this content will generate more views. And who would refuse more views these days, hmm?

This was just 1/3 of Telegram 4.0. Keep reading to learn more about Payments for Bots and the new Instant View Platform.

May 18, 2017,
The Telegram Team

P.S. Our founder has this weird urge to keep launching platforms that start with “Tele-”. Be sure to check out Telegraph, the publishing platform we launched last year.