--- title: Phone Lookup Bot emoji: 📞 colorFrom: blue colorTo: green sdk: gradio sdk_version: 6.29.1 python_version: "3.12" app_file: app.py pinned: false license: mit startup_duration_timeout: 30m short_description: Telegram phone lookup bot streaming HF dataset --- # 📞 Phone Lookup Telegram Bot Streams `Kzr0xx/Icmr-and-hitek` (104 GB) directly from HuggingFace via DuckDB. No download. No storage bucket. External heartbeat via GitHub Actions. ## Required Space Secrets | Secret | Value | Required? | |---|---|---| | `BOT_TOKEN` | Telegram bot token from @BotFather | ✅ Yes | | `SPACE_URL` | `https://-.hf.space` | ✅ Yes | | `WEBHOOK_SECRET` | `1221` (or any random string) | ✅ Recommended | | `HF_TOKEN` | HF read token | ⚠️ Recommended | | `TELEGRAM_PROXY` | Cloudflare Worker URL (see below) | ❌ Only if Telegram is blocked | ## Endpoints - `GET /health` — heartbeat / health check (used by keep-alive cron) - `POST /webhook` — Telegram webhook (auto-registered on startup) - `GET /` — Gradio landing page ## If Telegram API Is Blocked Some HF Space regions cannot reach `api.telegram.org`. If `setWebhook` logs show connection failures, deploy a Cloudflare Worker proxy: 1. Go to https://workers.cloudflare.com — create a free Worker 2. Paste this code: ```js export default { async fetch(request) { const url = new URL(request.url); url.hostname = "api.telegram.org"; return fetch(new Request(url, request)); } };