Can I get a phone number by user id via Telegram Bot API?

It's possible with bots 2.0 check out bot api docs.

https://core.telegram.org/bots/2-0-intro#locations-and-numbers https://core.telegram.org/bots/api#keyboardbutton


No, unfortunately Telegram Bot API doesn't return phone number. You should either use Telegram API methods instead or ask it explicitly from the user. You cannot get "friends" of a user as well.

You will definitely retrieve the following information:

  1. userid
  2. first_name
  3. content (whatever it is: text, photo, etc.)
  4. date (unixtime)
  5. chat_id

If user configured it, you will also get last_name and username.