How to Register Users Without Webhook

You can store your bot users on this site without setting a webhook.
Just call the following API endpoint from your bot code whenever a user starts your bot.

API Endpoint

https://broadcast.findolucky.site/api.php

Parameters

Sample Request URL

https://broadcast.findolucky.site/api.php?token=YOUR_BOT_TOKEN&user=123456789&first_name=Aswin&last_name=Joseph&username=sonictar

Sample Python Code

import requests
from telegram import Update
from telegram.ext import ApplicationBuilder, CommandHandler, ContextTypes

API_URL = "https://broadcast.findolucky.site/api.php"
BOT_TOKEN = "YOUR_BOT_TOKEN"  # The token you registered on your site

async def start(update: Update, context: ContextTypes.DEFAULT_TYPE):
    user = update.effective_user

    params = {
        "token": BOT_TOKEN,
        "user": user.id,
        "first_name": user.first_name or "",
        "last_name": user.last_name or "",
        "username": user.username or ""
    }

    # Send the data to your API
    try:
        response = requests.get(API_URL, params=params, timeout=5)
        print("API response:", response.text)
    except Exception as e:
        print("Error calling API:", e)

    await update.message.reply_text("Welcome! You have been registered.")

if __name__ == "__main__":
    app = ApplicationBuilder().token("YOUR_TELEGRAM_BOT_TOKEN").build()
    app.add_handler(CommandHandler("start", start))
    app.run_polling()

    

How to Use in Your Bot

In your bot's /start handler, call the API as shown above.
This will register the user in the broadcast system, even if you do not set a webhook.

Back to Bots