{"id":51025474,"url":"https://github.com/openapi/chatgpt-on-telegram","last_synced_at":"2026-06-21T19:30:34.282Z","repository":{"id":364952076,"uuid":"1242439259","full_name":"openapi/chatgpt-on-telegram","owner":"openapi","description":"💬 A lightweight bridge that connects Telegram bots with ChatGPT-style AI conversations, enabling seamless messaging, automation, and custom AI workflows with @Openapi®","archived":false,"fork":false,"pushed_at":"2026-06-15T07:21:43.000Z","size":388,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-15T09:12:47.800Z","etag":null,"topics":["agent","ai","automation","certified-api","chatgpt","gpt","mcp","openai","openapi","pec","python","sms","telegram","trust"],"latest_commit_sha":null,"homepage":"https://console.openapi.com","language":"Python","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/openapi.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-18T12:32:56.000Z","updated_at":"2026-06-15T07:21:47.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/openapi/chatgpt-on-telegram","commit_stats":null,"previous_names":["openapi/chatgpt-on-telegram"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/openapi/chatgpt-on-telegram","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openapi%2Fchatgpt-on-telegram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openapi%2Fchatgpt-on-telegram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openapi%2Fchatgpt-on-telegram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openapi%2Fchatgpt-on-telegram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openapi","download_url":"https://codeload.github.com/openapi/chatgpt-on-telegram/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openapi%2Fchatgpt-on-telegram/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34623906,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-21T02:00:05.568Z","response_time":54,"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":["agent","ai","automation","certified-api","chatgpt","gpt","mcp","openai","openapi","pec","python","sms","telegram","trust"],"created_at":"2026-06-21T19:30:33.713Z","updated_at":"2026-06-21T19:30:34.275Z","avatar_url":"https://github.com/openapi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://openapi.com/\"\u003e\n    \u003cimg alt=\"Openapi CLI\" src=\".github/assets/images/repo-header.png\" \u003e\n  \u003c/a\u003e\n\n  \u003ch1\u003eChatGPT on Telegram\u003c/h1\u003e\n  \u003ch4\u003eConnect Telegram bots to GPT with the power of certified \u003ca href=\"https://openapi.com/\"\u003eOpenapi®\u003c/a\u003e APIs\u003c/h4\u003e\n\n[![Build](https://github.com/openapi/chatgpt-on-telegram/actions/workflows/build.yml/badge.svg)](https://github.com/openapi/chatgpt-on-telegram/actions/workflows/build.yml)\n[![License](https://img.shields.io/github/license/openapi/chatgpt-on-telegram?ts=1771243284)](LICENSE)\n[![Linux Foundation Member](https://img.shields.io/badge/Linux%20Foundation-Silver%20Member-003778?logo=linux-foundation\u0026logoColor=white)](https://www.linuxfoundation.org/about/members)\n\u003c/div\u003e\n\nMinimal Python server that connects Telegram bots to GPT through a stateless\nwebhook flow. The server does not keep one process alive for each bot: setup\nregisters a Telegram webhook, and each Telegram update is processed by the\nsingle HTTP server instance.\n\n## Setup\n\n```bash\nmake install\n```\n\n## Run Locally\n\nTelegram webhooks require a public HTTPS URL. For local development, `make start`\ncan start ngrok automatically when `NGROK_DOMAIN` is not provided. It reads the\nHTTPS tunnel from the local ngrok API and exports it as `WEBHOOK_BASE_URL` for\nthe server process.\n\n```bash\nexport SERVER_SECRET_KEY=\"any-private-string\"\nexport DATA_PATH=\"./data\"\nmake start\n```\n\nIf you already have a fixed ngrok domain, pass it explicitly. `make start` will\nstart ngrok with that domain using `ngrok http --domain \u003cdomain\u003e 8000` and will\nadd `https://` to `WEBHOOK_BASE_URL` when omitted.\n\n```bash\nmake start NGROK_DOMAIN=\"your-domain.ngrok-free.app\"\nmake start NGROK_DOMAIN=\"https://your-domain.ngrok-free.app\"\n```\n\nOn startup the server prints the effective `WEBHOOK_BASE_URL`, so you can verify\nthat the webhook origin is the expected public HTTPS URL.\n\nOpen `http://127.0.0.1:8000`, fill in `ChatGPT Prompt ID`,\n`Telegram Bot HTTP API Token` and `OpenAI API Key`, then create the bot link.\n\nDuring setup the server:\n\n- validates the Telegram token with `getMe`\n- stores the encrypted bot configuration under `DATA_PATH`\n- registers a Telegram webhook at `/webhook/\u003cbot-id\u003e`\n- returns a `/launch/\u003cbot-id\u003e` link that redirects to the Telegram chat\n\nIn production or Docker, configure `WEBHOOK_BASE_URL` directly with the external\nHTTPS origin that Telegram can reach. Do not include `/webhook/...`; the server\nadds the webhook path itself.\n\n```bash\nexport WEBHOOK_BASE_URL=\"https://example.com\"\n```\n\nIf you run behind a reverse proxy, `WEBHOOK_BASE_URL` should be the public HTTPS\norigin of that proxy.\n\n## Runtime Storage\n\n`DATA_PATH` defaults to `./data`. It contains encrypted bot payloads and encrypted chat\nsession state. Mount it to persistent external storage in production.\n\nConversation context is not kept forever: the server stores chat history with\ntimestamps and sends only messages from the last hour as context. Older messages\nare not sent back to OpenAI.\n\nSensitive fields are encrypted at rest with `SERVER_SECRET_KEY`. Keep that key\nstable across restarts or existing bot configurations cannot be decrypted.\n\n## Run With Docker\n\n```bash\nexport SERVER_SECRET_KEY=\"any-private-string\"\nexport WEBHOOK_BASE_URL=\"https://example.com\"\nexport DATA_PATH=\"./data\"\nmake docker-start\n```\n\nThe app is exposed at `http://127.0.0.1:8000`. In `compose.yml`, host\n`DATA_PATH` is mounted into the container at `CONTAINER_DATA_PATH`\n(default `/data`). The container reads its storage location from the `DATA_PATH`\nenvironment variable.\n\n## Contributing\n\nContributions are always welcome! Whether you want to report bugs, suggest new features, improve documentation, or contribute code, your help is appreciated.\n\n## Authors\n\n- Openapi Team ([@openapi-it](https://github.com/openapi-it))\n\n## Partners\n\nMeet our partners using Openapi or contributing to this project:\n\n- [Blank](https://www.blank.app/)\n- [Credit Safe](https://www.creditsafe.com/)\n- [Deliveroo](https://deliveroo.it/)\n- [Gruppo MOL](https://molgroupitaly.it/it/)\n- [Jakala](https://www.jakala.com/)\n- [Octotelematics](https://www.octotelematics.com/)\n- [OTOQI](https://otoqi.com/)\n- [PWC](https://www.pwc.com/)\n- [QOMODO S.R.L.](https://www.qomodo.me/)\n- [SOUNDREEF S.P.A.](https://www.soundreef.com/)\n\n## Our Commitments\n\nWe believe in open source and we act on that belief. We became Silver Members\nof the Linux Foundation because we wanted to formally support the ecosystem\nwe build on every day. Open standards, open collaboration, and open governance\nare part of how we work and how we think about software.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n\nThe MIT License is a permissive open-source license that allows you to freely use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the software, provided that the original copyright notice and this permission notice are included in all copies or substantial portions of the software.\n\nFor more details, see the full license text at the [MIT License page](https://choosealicense.com/licenses/mit/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenapi%2Fchatgpt-on-telegram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenapi%2Fchatgpt-on-telegram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenapi%2Fchatgpt-on-telegram/lists"}