{"id":36544728,"url":"https://github.com/fonbah/tdlnode","last_synced_at":"2026-01-12T05:57:29.835Z","repository":{"id":178761422,"uuid":"173920337","full_name":"fonbah/tdlnode","owner":"fonbah","description":"Telegram nodejs client","archived":false,"fork":false,"pushed_at":"2023-10-02T18:28:28.000Z","size":32,"stargazers_count":16,"open_issues_count":3,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-30T21:02:49.680Z","etag":null,"topics":["tdlib","telegram","telegram-api","telegram-nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fonbah.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-05T09:55:05.000Z","updated_at":"2023-08-28T02:09:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"045435d8-3658-4345-ac68-5b681a34dde2","html_url":"https://github.com/fonbah/tdlnode","commit_stats":null,"previous_names":["fonbah/tdlnode"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fonbah/tdlnode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fonbah%2Ftdlnode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fonbah%2Ftdlnode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fonbah%2Ftdlnode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fonbah%2Ftdlnode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fonbah","download_url":"https://codeload.github.com/fonbah/tdlnode/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fonbah%2Ftdlnode/sbom","scorecard":{"id":406255,"data":{"date":"2025-08-11","repo":{"name":"github.com/fonbah/tdlnode","commit":"adf317e1a77ae3f8e8a2753581e1342897a08536"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T21:20:08.160Z","repository_id":178761422,"created_at":"2025-08-18T21:20:08.160Z","updated_at":"2025-08-18T21:20:08.160Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28335934,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"online","status_checked_at":"2026-01-12T02:00:08.677Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["tdlib","telegram","telegram-api","telegram-nodejs"],"created_at":"2026-01-12T05:57:29.224Z","updated_at":"2026-01-12T05:57:29.830Z","avatar_url":"https://github.com/fonbah.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"### tdlnode\nTelegram nodejs client https://github.com/tdlib/td\n\n- [Getting started](#getting-started)\n- [Handling events](#events)\n- [Options](#options)\n- [Handling input](#client-input)\n- [Handling errors](#client-errors)\n- [TDLib](#tdlib)\n\n### Requirements\n1. Node.js \u003e= 10 preferred (minimum \u003e= 9.0.0)\n2. TDLib binary https://github.com/tdlib/td\n\n\u003ca name=\"getting-started\"\u003e\u003c/a\u003e\n### Getting started\n- Build TDLib binary https://tdlib.github.io/td/build.html?language=JavaScript\n- `npm i tdlnode`\n- Execute any of TDLib API methods https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_function.html\n```js\nconst path = require('path')\nconst { Client } = require('tdlnode')\n\nconst api_id = 'your api_id'\nconst api_hash = 'your api_hash'\nconst phone_number = '+12345679021' // or const token = 'your token'\n\nconst configuration = {\n    path_to_binary_file: path.resolve(__dirname, '../lib/libtdjson'),\n    database_directory: path.resolve(__dirname, '../storage'),\n    files_directory: path.resolve(__dirname, '../downloads'),\n    log_file_path: path.resolve(__dirname, '../logs/tdl.log'),\n}\n\nconst up = async () =\u003e {\n    const client = new Client({ api_id, api_hash, phone_number }, configuration)\n\n    await client.init()\n\n    const chats = await client.fetch({\n        '@type': 'getChats',\n        'offset_order': '9223372036854775807',\n        'offset_chat_id': 0,\n        'limit': 100,\n    })\n\n    console.log(chats)\n\n    client.stop()\n}\n\nup()\n```\n\n\u003ca name=\"events\"\u003e\u003c/a\u003e\n### Events\nSubscribe to:\n- updates https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_update.html\n- any of TDLib API return object type https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_function.html\n```js\nconst callback = msg =\u003e {console.log('event', msg)}\n\nclient.on('updateOption', callback)\n\nclient.once('updateOption', callback)\n\nclient.off('updateOption', callback)\n```\n\n### More examples\nhttps://github.com/fonbah/tdlnode/tree/master/examples\n\n\u003ca name=\"options\"\u003e\u003c/a\u003e\n### Options\n```js\nconst conf = {\n    path_to_binary_file: path.resolve(__dirname, '../lib/libtdjson'), //default 'libtdjson'\n    enable_storage_optimizer: true, //default true\n    use_message_database: true, //default true\n    use_secret_chats: false, //default false\n    system_language_code: 'en', //default 'en'\n    application_version: version, //default pacage.json version\n    device_model: 'nodejs', //default 'nodejs'\n    system_version: '10', //default 10\n    database_directory: path.resolve(__dirname, '../storage'), //default './storage'\n    files_directory: path.resolve(__dirname, '../downloads'), //default './downloads'\n    log_file_path: path.resolve(__dirname, '../logs/tdl.log'), //default './logs/tdl.log'\n    use_test_dc: true, //default false If set to true, the Telegram test environment will be used instead of the production environment. \n    verbosity_level: 10, //default 2\n    fatal_error_callback: e =\u003e { console.log(e) }, //default console.log\n}\n```\n\n\u003ca name=\"client-input\"\u003e\u003c/a\u003e\n### Client input handling\n```js\nconst types = client.input.getTypes()\n\nconst verificationCodeHandler = resolve =\u003e {\n    const code = 'get somehow your code here'\n    resolve(code)\n}\n\nconst inputHandler = (type, resolve) =\u003e {\n    switch (type) {\n        case 'code':\n            verificationCodeHandler(resolve)\n            break\n    }\n}\nconst unsubscribe = client.input.subscribe(inputHandler)\n```\nfull example https://github.com/fonbah/tdlnode/blob/master/examples/input.js\n\n\u003ca name=\"client-errors\"\u003e\u003c/a\u003e\n### Errors handling\n```js\nclient.on('error', update =\u003e {\n    console.log('client error', update)\n    if (update.code == 429) {\n        client.stop()\n    }\n})\n```\n\n\u003ca name=\"tdlib\"\u003e\u003c/a\u003e\n### Getting started with telegram TDLib\n- api_id and api_hash https://my.telegram.org/\n- documentation https://core.telegram.org/tdlib/getting-started\n- TDLib API updates objects https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_update.html\n- list of all available TDLib API methods https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_function.html\n- building instructions https://tdlib.github.io/td/build.html?language=JavaScript\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffonbah%2Ftdlnode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffonbah%2Ftdlnode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffonbah%2Ftdlnode/lists"}