{"id":51317707,"url":"https://github.com/machsix/telegram_to_bark","last_synced_at":"2026-07-01T09:03:00.815Z","repository":{"id":355754291,"uuid":"1228290515","full_name":"machsix/telegram_to_bark","owner":"machsix","description":"Use [Bark](https://github.com/Finb/Bark) to push notifications for sideloaded telegram","archived":false,"fork":false,"pushed_at":"2026-05-05T04:06:14.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-05T06:18:04.824Z","etag":null,"topics":["bark","telegram"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"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/machsix.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-03T20:55:11.000Z","updated_at":"2026-05-05T04:06:18.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/machsix/telegram_to_bark","commit_stats":null,"previous_names":["machsix/telegram_to_bark"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/machsix/telegram_to_bark","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/machsix%2Ftelegram_to_bark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/machsix%2Ftelegram_to_bark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/machsix%2Ftelegram_to_bark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/machsix%2Ftelegram_to_bark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/machsix","download_url":"https://codeload.github.com/machsix/telegram_to_bark/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/machsix%2Ftelegram_to_bark/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34999792,"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-07-01T02:00:05.325Z","response_time":130,"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":["bark","telegram"],"created_at":"2026-07-01T09:02:59.903Z","updated_at":"2026-07-01T09:03:00.809Z","avatar_url":"https://github.com/machsix.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Telegram to Bark\r\n\r\nA self-hosted Telegram userbot that forwards incoming messages as push notifications to [Bark](https://bark.day.app) (iOS).\r\n\r\n## Features\r\n\r\n- **Message forwarding** — forwards incoming text and media messages to your Bark endpoints\r\n- **Activity suppression** — skips notifications while you are actively using Telegram (configurable idle timeout)\r\n- **Archive filter** — ignores messages from archived chats, reloaded every hour\r\n- **Mute filter** — respects Telegram's per-chat and global mute/silent notification settings\r\n- **Image upload** — uploads favicon of the chat to an image hosting service and includes the URL in the notification so that Bark can display it as an icon; supports [tmpfiles.org](https://tmpfiles.org) (no key) and [ImgBB](https://imgbb.com) (free API key)\r\n\r\n\r\n## Running\r\n\r\n### Docker (recommended)\r\n\r\nPlace your `config.json` inside a `config/` folder next to `docker-compose.yml`, then:\r\n\r\n```bash\r\ndocker compose up -d\r\n```\r\n\r\nThe container auto-detects `/app/config/config.json` (mounted from `./config`).\r\n\r\nPull a pre-built image:\r\n\r\n```bash\r\ndocker run -v ./config:/app/config ghcr.io/\u003cyour-username\u003e/telegram_to_bark:latest\r\n```\r\n\r\nForce a clean rebuild:\r\n\r\n```bash\r\ndocker compose build --no-cache\r\n```\r\n\r\n### Local\r\n\r\n```bash\r\npip install -r requirements.txt\r\npython telegram_bark_client.py\r\n# or point to a config directory:\r\npython telegram_bark_client.py --config-dir /path/to/config\r\n```\r\n\r\nConfig is auto-detected in this order: current working directory → `/config` → `/app/config`.\r\n\r\n## Setup\r\n\r\nRun the interactive wizard to create `config.json` and generate a Telegram session string:\r\n\r\n```bash\r\npython init.py\r\n# or for a specific directory:\r\npython init.py --config-dir ./config\r\n```\r\n\r\nThe wizard walks through all sections: Telegram credentials, Bark endpoints, activity timeout, logging, and image cache backend.\r\n\r\n## Configuration\r\n\r\n`config.json` (JSONC — `//` comments supported):\r\n\r\n```jsonc\r\n{\r\n  \"telegram\": {\r\n    \"api_id\": 12345678,             // from https://my.telegram.org/apps\r\n    \"api_hash\": \"your_api_hash\",\r\n    \"phone_number\": \"+1234567890\",\r\n    \"session_string\": \"\"            // filled in by init.py\r\n  },\r\n  \"bark\": {\r\n    \"endpoints\": [\r\n      \"https://api.day.app/YOUR_BARK_KEY\"\r\n    ],\r\n    \"group\": null,                  // notification group name (optional)\r\n    \"sound\": null                   // notification sound (optional)\r\n  },\r\n  \"activity\": {\r\n    \"timeout_seconds\": 300          // suppress notifications for this many seconds after last activity\r\n  },\r\n  \"logging\": {\r\n    \"level\": \"INFO\",\r\n    \"file\": null                    // path to log file (optional)\r\n  },\r\n  \"image_cache\": {\r\n    \"backend\": \"tmpfiles\",          // \"tmpfiles\" or \"imgbb\"\r\n    \"imgbb_api_key\": null,          // required when backend is \"imgbb\"\r\n    \"expiration_days\": 7,\r\n    \"db_path\": \"image_cache.db\"\r\n  }\r\n}\r\n```\r\n\r\n### Image cache backends\r\n\r\n| Backend | Key required | Notes |\r\n|---|---|---|\r\n| `tmpfiles` | No | Files expire after the configured days; URLs are direct download links |\r\n| `imgbb` | Yes (free at [imgbb.com](https://api.imgbb.com)) | Persistent hosting with expiration support |\r\n\r\n## Requirements\r\n\r\n- Python 3.11+\r\n- Telegram API credentials from [my.telegram.org/apps](https://my.telegram.org/apps)\r\n- [Bark](https://apps.apple.com/app/bark-customed-notifications/id1403753865) installed on your iPhone\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmachsix%2Ftelegram_to_bark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmachsix%2Ftelegram_to_bark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmachsix%2Ftelegram_to_bark/lists"}