{"id":21412812,"url":"https://github.com/hunghg255/telegram-sdk","last_synced_at":"2025-07-14T02:32:24.098Z","repository":{"id":250670057,"uuid":"835153386","full_name":"hunghg255/telegram-sdk","owner":"hunghg255","description":" This repository offers an npm package for developing web applications for your Telegram bot.","archived":false,"fork":false,"pushed_at":"2024-07-29T10:35:49.000Z","size":72,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-24T04:43:34.589Z","etag":null,"topics":["biometricmanager","disableverticalswipes","sdk","telegram","telegram-api","telegram-bot","telegram-bot-api","telegram-bots","telegram-sdk","telegramapi","telegrambot"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/hunghg255.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-07-29T09:12:14.000Z","updated_at":"2024-10-07T02:24:24.000Z","dependencies_parsed_at":"2024-07-29T09:35:42.426Z","dependency_job_id":null,"html_url":"https://github.com/hunghg255/telegram-sdk","commit_stats":null,"previous_names":["hunghg255/telegram-sdk"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hunghg255/telegram-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunghg255%2Ftelegram-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunghg255%2Ftelegram-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunghg255%2Ftelegram-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunghg255%2Ftelegram-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hunghg255","download_url":"https://codeload.github.com/hunghg255/telegram-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunghg255%2Ftelegram-sdk/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265233753,"owners_count":23731825,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["biometricmanager","disableverticalswipes","sdk","telegram","telegram-api","telegram-bot","telegram-bot-api","telegram-bots","telegram-sdk","telegramapi","telegrambot"],"created_at":"2024-11-22T18:15:50.103Z","updated_at":"2025-07-14T02:32:23.586Z","avatar_url":"https://github.com/hunghg255.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003ca href=\"https://www.npmjs.com/package/telegram-sdk\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\n\u003cimg src=\"https://api.iconify.design/logos:telegram.svg?color=%23bbdf58\" alt=\"logo\" width='100'/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  This repository offers an npm package for developing web applications for your Telegram bot. It re-exports the API provided by Telegram's JS module. The benefit of this package is that it includes TypeScript types, simplifying project setup.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/telegram-sdk\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\u003cimg src=\"https://badge.fury.io/js/telegram-sdk.svg\" alt=\"NPM Version\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/telegram-sdk\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\u003cimg src=\"https://img.shields.io/npm/dt/telegram-sdk.svg?logo=npm\" alt=\"NPM Downloads\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://bundlephobia.com/result?p=telegram-sdk\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\u003cimg src=\"https://img.shields.io/bundlephobia/minzip/telegram-sdk\" alt=\"Minizip\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/hunghg255/telegram-sdk/graphs/contributors\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\u003cimg src=\"https://img.shields.io/badge/all_contributors-1-orange.svg\" alt=\"Contributors\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/hunghg255/telegram-sdk/blob/main/LICENSE\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\u003cimg src=\"https://badgen.net/github/license/hunghg255/telegram-sdk\" alt=\"License\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\n\n## Installation\n\n```bash\npnpm add telegram-sdk\n```\nyou don't need to install the Telegram JS module separately, as it is included in this package.\n\n## Setup\n\n- Import core module in root file of your project.\n\n```ts\nimport 'telegram-sdk/core';\n```\n\n\n## Usage\n\n- Use the API provided by the Telegram JS module.\n\n```typescript\nimport { WebApp, WebView } from 'telegram-sdk';\n\n// to display the initData\nconsole.log(WebApp.initData);\n\n// to show the main button\nWebApp.MainButton.show();\n\n// to set the app background color\nWebApp.setBackgroundColor('#f60000')\n\n// to set the app header color\nWebApp.setHeaderColor('bg_color');\n\n// Display a swipe vertical by event\nWebView.postEvent('web_app_setup_swipe_behavior', false, {\n  allow_vertical_swipe: false,\n});\n\n// ready method must come last\nWebApp.ready();\n```\n\n## disableVerticalSwipes\n\n```ts\nimport { WebApp, WebView } from 'telegram-sdk';\n\n// Config something...\nWebApp.expand(); // Expand app\nWebApp.disableClosingConfirmation();\nWebApp.disableVerticalSwipes(); // Disable Vertical Swiper\n\n// ready method must come last\nWebApp.ready();\n```\n\n## Documentation\n\n- Refer to the official [Telegram documentation](https://core.telegram.org/bots/webapps#initializing-web-apps) for Web Apps to explore additional features available through WebApp.\n\n- Core script is available in the [Telegram JS module](https://telegram.org/js/telegram-web-app.js)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhunghg255%2Ftelegram-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhunghg255%2Ftelegram-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhunghg255%2Ftelegram-sdk/lists"}