首页 » Use Cases for Bots Requesting Phone Numbers:

Use Cases for Bots Requesting Phone Numbers:

Rate this post

Ethical Consideration: This is the only ethical and sanctioned way to request a user’s own phone number. Bots must clearly state why they need the number before presenting this button.

Requesting Another User’s or a Chat’s Details


>>Telegram also provides a way for users to share other Telegram users or chats with a bot, which might indirectly involve phone numbers if the shared user’s privacy settings allow it.


>request_chat: Prompts the user to select any Telegram chat (private chat with another user, group, channel).
>User Experience: The user taps the button, and Telegram opens an interface allowing them to search for and select a user or chat.
Bot’s Receipt:
If a user is shared, the bot receives a message object with message.user_shared containing the user_id of the shared user.
If a chat is shared, the bot receives message.chat_shared containing the chat_id.

Crucially: The phone number of the shared user is not directly provided to the bot through this method. The bot only gets their user_id. The user’s phone number visibility is telegram number database still subject to their personal privacy settings on Telegram. If the shared user’s settings allow it, and the bot then tries to get their profile information! via getChat or similar methods, it might indirectly ! see the phone number if the shared user has set their visibility to “Everybody.” However, this is not a direct phone number transfer.
>Ethical Consideration: Use this for features like “add this friend to my group” or “process payment for this channel,” not as a roundabout way to harvest phone numbers.

Retrieving Phone Numbers from Forwarded Contacts (Limited)

If a user manually forwards a contact marketing a new product or service card (from their phone’s address book) into a chat with your bot, the bot will receive the phone number included in that forwarded clean email contact message.

Bot’s Receipt: The message object will contain message.contact.phone_number.

滚动至顶部