Detecting User Link Shares in a Laravel Telegram Bot

I developed a Telegram bot using Laravel but need a way to confirm that a user has shared its invite link before registration. Any advice?

I implemented a similar feature in my Laravel Telegram bot project. Though Telegram does not offer an explicit webhook event for link shares, my method involved using callback queries. When a user clicked on a specially formatted button attached to an invite link, it triggered a callback that I monitored. I stored the response as confirmation of the share and allowed registration to proceed afterward. My approach required careful message design and error handling to ensure reliability, but it provided a solid workaround for the limitations in Telegram’s API.

hey, try embeding a uniqe token in the invite link that users send back during signup. not perfect but it acts as a share confirm. im using it since telegram doesnt natively track those events

I encountered a similar challenge with my Laravel-based Telegram bot. My solution was to use a two-phase registration process. After initiating interaction with the bot, users are prompted to share a predefined invitation message in a public channel or group where the bot is an administrator. Once the bot detects a forwarded copy of that original message—verified by matching message identifiers and metadata—it marks the share as valid and allows the registration to proceed. While this method isn’t foolproof due to Telegram’s limitations, it provides a practical workaround and can be fine-tuned with proper logging and additional verifications for improved reliability.