Andrew Bieleski
Andrew Bieleski

Reputation: 21

How can a Telegram Bot find out who sent an invite link when a new member joins a channel?

I'm new to bots and API requests. I'm trying to write a bot that, when it sees a new member joining by an invite link, posts a message in the channel that mentioned who invited in the new member. However, looking at the Telegram API, it seems that the User object type you can see when a new member joins doesn't track that.

Is this not possible in Telegram? If it is possible, how would I go about this? Do I have to make a bot that does it's own invite links/tracking?

Upvotes: 2

Views: 5135

Answers (1)

badrik patel
badrik patel

Reputation: 153

hey you can create a unique link for all of your members and when a new user joins you can check the invite link by which the user has joined. For that purpose you can use "chat_member" invite_link here is the docs which will show the invite link used by the user.

Upvotes: 1

Related Questions