{"id":13764840,"url":"https://github.com/telegram-s/telegram-api-old","last_synced_at":"2026-01-16T06:45:53.554Z","repository":{"id":11684650,"uuid":"14195683","full_name":"telegram-s/telegram-api-old","owner":"telegram-s","description":"Telegram Api library for java","archived":false,"fork":false,"pushed_at":"2017-04-18T04:54:54.000Z","size":1764,"stargazers_count":140,"open_issues_count":47,"forks_count":62,"subscribers_count":25,"default_branch":"master","last_synced_at":"2026-01-13T23:57:52.917Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/telegram-s.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-07T06:01:43.000Z","updated_at":"2025-08-22T17:51:32.000Z","dependencies_parsed_at":"2022-08-29T20:40:41.819Z","dependency_job_id":null,"html_url":"https://github.com/telegram-s/telegram-api-old","commit_stats":null,"previous_names":["ex3ndr/telegram-api"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/telegram-s/telegram-api-old","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telegram-s%2Ftelegram-api-old","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telegram-s%2Ftelegram-api-old/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telegram-s%2Ftelegram-api-old/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telegram-s%2Ftelegram-api-old/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/telegram-s","download_url":"https://codeload.github.com/telegram-s/telegram-api-old/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telegram-s%2Ftelegram-api-old/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477947,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T16:00:30.103Z","updated_at":"2026-01-16T06:45:53.365Z","avatar_url":"https://github.com/telegram-s.png","language":"Java","funding_links":[],"categories":["Bots"],"sub_categories":["Bot Libs"],"readme":"Java Telegram Api Library\n============\n\nThis library allows you to make rpc calls to [Telegram](http://telegram.org).\n\nDepends on [tl-core](https://github.com/ex3ndr/telegram-tl-core) and [mtproto](https://github.com/ex3ndr/telegram-mt) libraries.\n\nNow it used in our production-ready product [Telegram S](https://play.google.com/store/apps/details?id=org.telegram.android).\n\n[![Telegram build server](http://ci.81port.com/app/rest/builds/buildType:%28id:TelegramNetworking_JavaTelegramApi%29/statusIcon)](http://ci.81port.com/viewType.html?buildTypeId=TelegramNetworking_JavaTelegramApi)\n\nIncluding in your project\n------------\n#### Dependencies\n\nThis project depends on [java MTProto implementation](https://github.com/ex3ndr/telegram-mt) and [tl-core library](https://github.com/ex3ndr/telegram-tl-core)\n\n#### Binary\nDownload latest distribution at [releases page](https://github.com/ex3ndr/telegram-api/releases) and include jars from it to your project.\n\n#### Building from source code\n\nProject definded and gradle and expected to use IntelliJ IDEA 13 (now it is Beta) as IDE.\n\n1. Checkout this repository to ````telegram-api```` folder\n2. Checkout [mtproto java implementation](https://github.com/ex3ndr/telegram-mt) to ````mtproto```` folder\n3. Checkout [tl core library](https://github.com/ex3ndr/telegram-tl-core) to ````tl-core```` folder\n4. Execute ```gradle build``` at ```telegram-api``` folder\n\nUsage of library\n------------\n#### Implement storage\n\nYou might to implement storage class for working with api. This storage used for saving state of telegram api across execution instances.\n\nExtend class ````org.telegram.api.engine.storage.AbsApiState```` and implement suitable methods.\n\n#### Generating keys\nIn your storage might be information about keys in current datacenter.\nKeys might be generated manualy by using ````org.telegram.mtproto.pq.Authorizer class````.\n\n#### RPC calls\nNow you have proper key for accessing telegram api.\n\n```java\nTelegramApi api = new TelegramApi(new MyApiStorage(), new AppInfo(... put application information here...), new ApiCallback()\n{\n  @Override\n  public void onApiDies(TelegramApi api) {\n    // When auth key or user authorization dies\n  }\n  @Override\n  public void onUpdatesInvalidated(TelegramApi api) {\n    // When api engine expects that update sequence might be broken  \n  }\n});\n\n// Syncronized call\n// All request objects are in org.telegram.api.requests package\nTLConfig config = api.doRpcCall(new TLRequestHelpGetConfig());\n\n// Standart async call\napi.doRpcCall(new TLRequestHelpGetConfig(), new RpcCallback\u003cTLConfig\u003e()\n{\n  public void onResult(TLConfig result)\n  {\n    \n  }\n\n  public void onError(int errorCode, String message)\n  {\n    // errorCode == 0 if request timeouted  \n  }\n});\n\n// Priority async call\n// Such rpc call executed with high pripory and sends to server as fast as possible this may improve message delivery speed\napi.doRpcCall(new TLRequestHelpGetConfig(), new RpcCallbackEx\u003cTLConfig\u003e()\n{\n  public void onConfirmed()\n  {\n    // when message was received by server\n  }\n\n  public void onResult(TLConfig result)\n  {\n    \n  }\n  \n  public void onError(int errorCode, String message)\n  {\n    // errorCode == 0 if request timeouted  \n  }\n});\n\n// File operations\n// Method that downloads file part. Automaticaly managed connections for file operations, automaticaly create keys for dc if there is no one.\napi.doGetFile(...)\n// Uploads file part\napi.doSaveFilePart(...)\n```\n\nMore information\n----------------\n####Telegram project\n\nhttp://telegram.org/\n\n#### Telegram api documentation\n\nEnglish: http://core.telegram.org/api\n\nRussian: http://dev.stel.com/api\n\n#### MTProto documentation\n\nEnglish: http://core.telegram.org/mtproto\n\nRussian: http://dev.stel.com/mtproto\n\n#### Type Language documentation\n\nEnglish: http://core.telegram.org/mtproto/TL\n\nRussian: http://dev.stel.com/mtproto/TL\n\n#### Android Client that uses this library\n\n[![Telegram S](https://developer.android.com/images/brand/en_generic_rgb_wo_45.png)](https://play.google.com/store/apps/details?id=org.telegram.android \"Telegram S\")\n\nLicence\n----------------\nProject uses [MIT Licence](LICENCE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftelegram-s%2Ftelegram-api-old","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftelegram-s%2Ftelegram-api-old","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftelegram-s%2Ftelegram-api-old/lists"}