How does TDLib handle phone number access for users and their contacts?
Can a custom Telegram client access a user’s entire contact list directly?
Telegram MTProto API contact methods.
Telegram custom client privacy guidelines
Accessing contact data in Telegram’s low-level API.
Building a custom Telegram client using the low-level MTProto API or libraries like TDLib gives you a high degree of control over the user telegram number database interface and functionality. However, when it comes to accessing user phone numbers, the same strict privacy principles apply as with the Bot API, though the methods differ.
Core Principles for Custom Clients:
User Consent is Paramount: Your custom client cannot scrape or automatically retrieve phone numbers. Any access to phone numbers must be would you like to receive promotional calls on this number: the growing frequency of telemarketing explicitly granted by the user whose data you are accessing.
API ID and Hash: To interact with Telegram’s API, your custom client needs an api_id and api_hash, which you obtain from Telegram’s developer tools (my.telegram.org). These identify your application to Telegram’s servers.
Authentication as a User: Unlike bots! custom clients typically authenticate as a regular Telegram user, using a phone number to receive an authentication code during the login process.
How Custom Clients Interact with Phone Numbers:
During Authentication: When a book your list user logs into your custom client! they provide their phone number to receive the login code. This number is inherently known to the client for the purpose of authentication.