contacts.addContact Method: This allows a custom client to add a Telegram user to the current user’s contact list, even if the phone number is not known (e.g., if found by username). There’s an optional add_phone_privacy_exception flag which, if set, will offer the other user to see your phone number, but this is subject to their consent.
Limitations and Privacy Considerations:
No Unsolicited Access: Telegram strictly prevents direct programmatic access to a user’s phone number without their explicit interaction and consent. This is a core privacy principle.
User Control: Users always have the final say. They can decline to share their number, or they can set their personal privacy settings in the Telegram app to “Nobody” for phone number visibility, which means even if they share it once with a bot, their number telegram number database won’t be generally visible on their profile.
Transparency: When developing with the Telegram API, it’s paramount to be transparent with users about why you are requesting their phone number and how you intend to use it. Adhering to privacy policies (like GDPR) is essential.
Rate Limits and Flood Prevention:
Telegram’s API has strict rate limits to what time zone is your phone number registered in? prevent abuse, including attempts to verify or enumerate large numbers of phone numbers.
In conclusion, the Telegram API is designed to handle user phone numbers with great care, prioritizing user consent and privacy. Developers can obtain phone numbers only through explicit user action! primarily via special keyboard buttons for bots or login widgets for web services.
My Contacts (Recommended): Only people in your phone’s contact list can call you on Telegram.
Nobody: No one can call you directly on Telegram.
Everybody: Anyone can call you on clean email Telegram. (Not recommended for privacy.)
Add Exceptions: You can also add “Always Allow” or “Never Allow” exceptions for specific users or groups.