Code Monkey home page Code Monkey logo

Comments (3)

irazasyed avatar irazasyed commented on May 22, 2024 1

You can make use of the Deep linking feature Telegram offers.

Generate a unique token, show them a link and let the user start the bot with it. Once you get the start payload, you can associate the Telegram account with the user's account in your app.

Just make sure you revoke that token after associating the accounts. If the user wants to link to a new account, you can generate a new token (perhaps it could expire when the entire process is done so it's always unique).

from telegram.

axtg avatar axtg commented on May 22, 2024 1

Appreciate you thinking along, thanks for the inspiration!
I'm assuming this will require me to use the SDK instead. So I'll look at that one now.

from telegram.

irazasyed avatar irazasyed commented on May 22, 2024

In addition to the above, if you want to have the user confirm the opt-in (or rather double opt-in), you can perhaps show them a nice response from your bot as soon as you get the start payload telling them if they're sure they want to link this Telegram with the account in your app for notifications and an inline button with a callback query to confirm the same so it's easier to process or you could have an expiring external link too (again with a unique token).

While this isn't really required but it'll be more explicit in case if the user wasn't sure when they just clicked on the bot link in your app. Just an idea.

from telegram.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.