twofactor_gateway
twofactor_gateway copied to clipboard
Handle Telegram edge cases
In order to stabilize the Telegram integration, it needs a few fixes in its gateway implementation that handle edge cases.
Btw, @djpremier , see the new admin documentation for more info on how to set this up: https://github.com/nextcloud/twofactor_gateway/tree/master/doc/admin#telegram.
Basically https://github.com/nextcloud/twofactor_gateway/blob/ce47ec9b6752b1ea46e1153e64b0c09c0e30da8f/lib/Service/Gateway/Telegram/Gateway.php#L90.
Thanks Christoph, I already started the conversation with the button, in the case of '/start', and still I get the error.
Now I'm on the computer, I can give you more details.
Following @ChristophWurst , the process was basically this:
I installed the app I have read the documentation I created the bot and started the conversation '/ start' I configured via 'occ' the gateway I went back to my settings panel and added my number I get the error in the same place and also in the log, as you can see in the screenshots


and added my number
Did you enter your phone number or the chat id from the id bot?
Phone number
Get your ID via this bot and enter that is identifier.
Thank you, it worked! But it is strange that you have placed the requested message to enter the phone number, since what should be placed is chat_id.
Another alternative is to send the message of / start and access:
https://api.telegram.org/bot<token>/getUpdates
There you will have access to id
I think it would be interesting if possible to mount this mini tutorial there in docs 😉
Another alternative is to send the message of / start and access:
https://api.telegram.org/bot
/getUpdates
That's exactly what this app does internally. But with that info alone, you have no mapping of Nextcloud and Telegram users. Users have to enter their chat id.
The steps will be documented in the UI starting with the next release. Ref #82.