Comments (3)
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.
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.
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)
- How do I get the status of the sent message "ok" and "message_id? HOT 1
- Why image uploaded Telegram message is broken in 41 b size? HOT 1
- Method Chunk throws an error
- CouldNotSendNotification. cURL error 60: SSL certificate problem HOT 1
- Call to undefined method NotificationChannels\Telegram\TelegramMessage::file() HOT 4
- Telegram responded with an error `400 - Bad Request: group chat was upgraded to a supergroup chat`
- Laravel 10 compatibility HOT 5
- How to add message_thread_id to TelegramMessage::create() HOT 1
- update message(Custom endpoint overwriting needed) HOT 1
- The communication with Telegram failed HOT 3
- Posting in topics HOT 2
- sending album photos HOT 1
- How to send to multiple Telegram bots HOT 1
- Error: Call to a member function toNotGiven() on null HOT 2
- Cannot get message_id of sent message HOT 9
- Is there a way to send multiple images in one message? HOT 2
- it.tdlight.client.TelegramError: 400: Chat not found HOT 3
- Latest Commit isn't included in a tagged version HOT 1
- Telegram responded with an error `403 - Forbidden: bots can't send messages to bots HOT 1
- Please support laravel 11 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from telegram.