Search code examples
telegramtelegram-botpython-telegram-bot

Checking for the existence of a phone number using Telegram Bot API


I know it's not possible to chat with a user using Bot APIs but I'd like to know that is it possible to simulate the functionality of authCheckPhone method in the core API using Bot API methods? Thanks is advance


Solution

  • No, with the bot API you can only interact with users that have previously interacted with the bot, and you are very limited in what info you can access. You can only access data that has been sent in the chat room where the bot is in, that is messages, audios, images, files, etc. The only things that you can retrieve from the user itself (always considering that that user has an active chat with the bot) are the user profile photos, with the method getUserProfilePhotos.