0
KeyboardRow row = new KeyboardRow();
    row.add(KeyboardButton.builder()
            .text("contact")
            .requestContact(true)
            .build());

I want to get the user's phone number in this way. Is this safe to use? . For example, can't send another person to the contact.

  • [how-to-get-user-id-of-a-phone-number-in-telegram](https://stackoverflow.com/questions/41686463/how-to-get-user-id-of-a-phone-number-in-telegram) – Mohamad Ghaith Alzin Aug 12 '22 at 06:49
  • [can-i-get-a-phone-number-by-user-id-via-telegram-bot-api](https://stackoverflow.com/questions/33035709/can-i-get-a-phone-number-by-user-id-via-telegram-bot-api) – Mohamad Ghaith Alzin Aug 12 '22 at 06:50
  • I was asking if this method can be bypassed. So he can't send another person's contact. The article above does not say anything like that – Abdumajid Abdullatipov Aug 12 '22 at 06:56
  • I thought others links would help you. However, are you asking if the bot would return the exact user's phone number or by mistake would send a different number? If so, then for sure you will always get the correct number unless there is a bug from the telegram API side!! – Mohamad Ghaith Alzin Aug 12 '22 at 07:02
  • Thank you. yes, that's what I was saying Do you have proof of this anywhere? For example in the documentation – Abdumajid Abdullatipov Aug 12 '22 at 07:21
  • https://security.stackexchange.com/questions/178401/is-telegram-bot-phone-number-sharing-feature-a-sufficient-way-to-authenticate-a see this article – Abdumajid Abdullatipov Aug 15 '22 at 06:18

0 Answers0