monkeyUser
monkeyUser

Reputation: 4671

Revoke invitation link telegram

I have a telegram private group, and I want to understand how can I manage the link group and subscribers.

The user can reach my group only after a payment. I read that I can add 200 subscribers, after that I have to send an invitation link. I can see that I can revoke the link.

For example, I give a link, in that moment 10 users click on it, and 9 of them are in my group for free. Is it possible to set an invitation link with a count?

What is the best practice to invite a member in this case? If it needed I can create a bot with node.js

Upvotes: 1

Views: 2187

Answers (1)

Rolandf
Rolandf

Reputation: 1657

I was trying to do the same and came to the following conclusion after having compared many posts. You will have to code a bot. Here is the workflow:

  1. Generate a code for all your users it should comply with the format of the PAYLOAD for deep linking (please see documentation).
  2. Send personnal deep link to your users through email, on a thank you page after a sale or in the member area of your site
  3. When the user Start the private conversation with your bot through clicking the deep link the bot will have to lookup your database to see if the deeplink match a user
  4. If the user has a valid deeplink, put him in a queue
  5. For each user in the queue get an invite link using exportChatInviteLink
  6. send the invite link to the user through an inline keyboard button
  7. catch join events to see if the user that join is the one you just sent the link
  8. if not, kick the user out of your group, if yes mark that user request to join as complete
  9. create a new invite link, it will invalidate the previous one
  10. pick up next user in the queue and repeat steps 6 to 10

You may want to manage a timeout value to avoid one user blocking the queue.

Upvotes: 1

Related Questions