D
D
DobbiKov2020-09-05 00:56:12
Bots
DobbiKov, 2020-09-05 00:56:12

How to get Telegram Bot user's phone number?

I am writing a telegram bot. For identification in a DB, the phone number of the user is necessary to me. How to get the phone number of the user who sent the message or is chatting with the bot?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan Shumov, 2020-09-05
@inoise

Ask the user. This is confidential information and the bot cannot have access to it.

A
Alexey Hukendo, 2020-09-05
@hukendo

You won't get the user's phone number, there is a userid that goes with every message.
https://core.telegram.org/bots/api#user

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question