I’ve been working on a Telegram bot and need to add deep linking functionality. I know that Telegram supports deep linking through their API, but I’m wondering if this feature works with the long polling approach instead of webhooks.
The reason I want to use polling is because webhooks are hard to test when developing locally on my machine. I need to set up tunneling and SSL certificates which makes the development process more complicated.
Has anyone successfully implemented deep linking with a polling-based Telegram bot? Are there any limitations or special considerations I should know about when using this combination?
Deep linking works perfectly with polling - no difference at all in how your bot gets the start parameters. Click a deep link like t.me/yourbot?start=parameter123 and your bot receives /start parameter123, whether you’re using polling or webhooks. The delivery method doesn’t change the message content. I’ve used this in several production bots with polling, works great. Just make sure you parse the start parameter correctly from the message text after /start. One heads up though - deep link parameters only come with the /start command. If someone’s already started your bot before, they won’t get the parameter again unless they restart the bot first.
for sure! deep linking works great with polling. it doesn’t matter if it’s polling or webhooks, the params get into the updates just fine. been using it like that myself for a while, no issues at all!
Deep linking works perfectly with polling. I switched from webhooks to polling for development about six months ago and haven’t looked back. Here’s the thing - deep linking parameters get handled at Telegram’s server level before they hit your bot, so it doesn’t matter if you’re using getUpdates or webhooks. Someone clicks your deep link, Telegram processes it and sends the update to your bot either way. I actually prefer polling for development since you can restart your bot instantly without dealing with webhook registration delays. Just heads up - deep link parameters max out at 64 characters. If you need to pass complex data, use the parameter as a database key instead.