There are several bots doing that, but I’m reluctant with that. You never know if, and, or how they are (want to) use it.
I found an other solution, when you have to get the user-id without the Telegram Node-Red functions, which looks more secure to me:
-
Go to the web version of the Telegram messenger with your browser: https://web.telegram.org
-
Login with your phone number. Your Telegram messenger app on your phone will sent you login-code. Use this code to log in into the Telegram web version.
-
Select your Saved Messages account.
FYI: In fact, that is your private Telegram cloud storage.
If you don’t see that ‘account’ you can enable it, if I remember correctly, by selecting the 3 horizontal stripes icon (left top) in your Telegram phone messenger app and select the saved messages option from the pull down menu. Store a message and the Saved Messages account should show up. -
Check the web-browser URL, it will look something like:
https://web.telegram.org/#/im?p=u12345678_9101112131415161718
Your user ID is the number between the im?p=u and the _ character, in the above example 12345678.
In this way you can get all user-IDs of your contacts, by selecting them and check the URL!
P.S. When done, don’t forget to log out from the Telegram web version by selecting the top left 3 horizontal stripes (Options), select Settings, select Log out at the bottom.