Types of Users in Telegram API: UsersShared

telegram bot api users shared types
26 June 2025

Introduction to Types of Users in Telegram API


The Telegram API is a highly powerful resource for developers, allowing them to build their own Telegram connections and add different features to them. One of the key concepts in the Telegram API is the type of users. Here, we will explore one of the important types of users called UsersShared.


The UsersShared type allows you to access user information that is shared between two linked connections. This information can include the username, user ID, and more. Therefore, you can better identify your own users in an environment where there are multiple connections.


This type of user is especially useful when you are working on larger projects that require more collaboration and interaction among users, which is quite common. For example, you could create a connection that aggregates user information and interacts with users, providing valuable insights for future analyses.


One of the challenges you may encounter when working with UsersShared is managing user information and protecting their privacy. It is important to comply with privacy laws and only aggregate necessary information for your goals.


How to Use UsersShared in Telegram API


To use the UsersShared type, you need to utilize various Telegram API methods and request necessary information from the Telegram server. One of the main methods for this purpose is /getChatMember, using it can help you retrieve user information from shared connections. Let’s take a look at how to use this method.



// Example usage of the getChatMember method
https://api.telegram.org/bot<توکن_شما>/getChatMember?chat_id=<چت_ID>&user_id=<شناسه_کاربر>

In the example above, by using the token for the bot and user ID, you can retrieve user information in a specific chat. This information can help you create a better experience for users.


FAQ

?

What is UsersShared in Telegram API?

?

How can I aggregate user information with UsersShared?

?

Should I be concerned about user privacy?

?

How can I use the Telegram API?