Search code examples
pythontelegram-botrefer

is there any method or api available to create unique referral link for telegram bot with python


I'm trying to create bot in python with referral feature but I didn't get any method to create referral links for user in telegram docs. can you suggest any alternative approach for it. so that we can create a link and any new member can follow that link to start bot and referral got registered in referrers account.


Solution

  • You can use the Deep Linking feature which allows you to add a custom parameter for your convenience

    https://t.me/my_telegram_bot?start=ref01
    

    The user will be sent to the Bot and, after clicking on Start, the value ref01 is passed to the start command handler.