As a part of my application we require a valid TG username to be used. For the moment I just send a request to https://t.me/username and parse the html of the response, but I am sure this is not the best way to do it.
Is there any endpoint be it php or js that allows developers to check if a TG username is valid?
Thank you in advance!