Telegram- Contact -ukussa-server-bot Official

nano /etc/systemd/system/ukussa-bot.service Add:

async def start(update: Update, context: ContextTypes.DEFAULT_TYPE): # Create a button that shares the user's contact contact_button = KeyboardButton(text="Share My Contact", request_contact=True) reply_markup = ReplyKeyboardMarkup([[contact_button]], resize_keyboard=True) await update.message.reply_text( "Welcome to the ukussa server bot. Press the button below to link your contact to our server.", reply_markup=reply_markup ) Telegram- Contact -ukussa-server-bot

ssh root@your-server-ip apt update && apt upgrade -y apt install python3-pip nginx -y mkdir /var/telegram-ukussa-bot cd /var/telegram-ukussa-bot Create bot.py with the following logic—specifically designed to handle the CONTACT shared type. nano /etc/systemd/system/ukussa-bot

tail -f /var/log/ukussa_contacts.log You have now built a functional . Part 4: Advanced Features for the "ukussa" Server Bot To elevate your bot from a simple collector to an enterprise-grade tool, add these modules: A. Reverse Phone Lookup When the ukussa server receives a contact, have it query an external API (like Twilio Lookup or a local SS7 gateway) to validate if the number is active and what carrier it uses. B. Geo-IP Tagging Extract the user's update.effective_user metadata. While Telegram doesn't expose IP directly, if you use a webhook method, you can extract the X-Forwarded-For header to approximate the user's location. The server (ukussa) then tags the contact with a region code. C. Multi-Server Synchronization The name "ukussa" might imply one node in a cluster. Use Redis Pub/Sub to sync contacts across multiple Telegram bots running on different servers (e.g., ukussa , londra , tokyo servers). Part 4: Advanced Features for the "ukussa" Server

# Run the bot on the server (polling method for simplicity) print("ukussa-server-bot is running...") app.run_polling() if == " main ": main() Step 3: Running as a Persistent Service To ensure ukussa-server-bot never dies, create a systemd service.

async def handle_contact(update: Update, context: ContextTypes.DEFAULT_TYPE): contact = update.message.contact user_id = update.effective_user.id phone = contact.phone_number first_name = contact.first_name last_name = contact.last_name or ""