Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL

TelegramMessenger/Telegram

Productivity & Utilities

Official Android source code for the Telegram messaging app, intended for developers building or studying the client.

30,302
10,579
Java
GPL-2.0
13 years old

What this is

This repository holds the official Java source code of the Telegram messenger for Android, the same client distributed through Google Play Play Store listing. It covers the app's messaging interface and its use of Telegram's API and MTProto protocol API documentation, MTProto documentation. It is aimed at developers who want to build a Telegram client, fork the client, or study how a large Android messaging app is structured — not at end users looking for an APK.

Build requirements

  • Android Studio 2025.1.4
  • Android NDK 27.2.12479018
  • Android SDK 36
  • Your own Telegram API credentials, obtained via the official api_id process obtain an api_id
  • A release keystore, plus Firebase project settings for push messaging

The repo ships a dummy release.keystore, a placeholder google-services.json, and pre-filled values in BuildVars.java, so a first build can succeed, but these must be replaced with your own before distributing anything reproducible builds note.

Build steps

  1. Clone with submodules:

    git clone --recursive --shallow-submodules https://github.com/DrKLO/Telegram.git Telegram
    

    If you cloned without --recursive, run git submodule init && git submodule update --init --recursive --depth=1 inside the directory.

  2. Copy your release.keystore into TMessagesProj/config.

  3. Set RELEASE_KEY_PASSWORD, RELEASE_KEY_ALIAS and RELEASE_STORE_PASSWORD in gradle.properties.

  4. In the Firebase console, create two Android apps with IDs org.telegram.messenger and org.telegram.messenger.beta, enable Firebase messaging, and download google-services.json into the same folder as TMessagesProj.

  5. Open the project in Android Studio (open it, do not import it).

  6. Fill in the variables in TMessagesProj/src/main/java/org/telegram/messenger/BuildVars.java; each variable links to where its value comes from.

  7. Compile.

Translations have moved to the Telegram translations portal.

Constraints

  • The GPL-2.0 license means derivative apps must publish their own source too, as the README's rules for third-party clients state.
  • Independent apps must not use the Telegram name or the standard paper-plane logo, and should make clear that they are unofficial.
  • Your own api_id is required; the bundled placeholder credentials are not usable for a real app.
  • Client development should follow Telegram's security guidelines for handling user data.
  • Building needs a large Android toolchain; there is no prebuilt APK in the repository.

HotRepo's take

The repository has been public since 2013 and carries about 30k stars and 10.6k forks. On the Java-language daily list for 2026-11-16 it recorded 8 new stars and a best position of 16. That is a slow-moving, mature codebase rather than a trending one, which fits an official client whose main value is the reference implementation and the build process documented above.

Written by AI from the project's README, updated . The project's own docs are the source of truth.

You might also like

  1. TelegramMessenger/Telegram-AndroidOfficial Android source for the Telegram messaging app, aimed at developers building their own client.Java30,302
  2. DrKLO/TelegramThe official Android client source for Telegram, useful to developers building or auditing a messenger, not as a kit for private chat.Java30,157
  3. TGX-Android/Telegram-XAn official alternative Telegram client for Android with full source and reproducible build instructions.Java6,192
  4. telegramdesktop/tdesktopOfficial Telegram desktop client source for building and using the messenger on Windows, macOS and Linux.C++33,411
  5. FoxCoderGit/AstraGramAn independent Android Telegram client that adds optional media, plugin and update tooling.Java115