简体   繁体   English

如何通过 UserID 获取电报用户信息?

[英]How get telegram user info by UserID?

I have a user_id like 2024211111. How i can get user info by this user_id?我有一个像 2024211111 这样的user_id 。如何通过这个 user_id 获取用户信息? Tdlib api have a method called getUser , but it doesn't work with this user_id ( this user_id not in my ChatList ) Tdlib api 有一个名为getUser的方法,但它不适用于此 user_id(此 user_id 不在我的 ChatList 中

Simple answer: This function doesn't exist .简单的回答:这个 function 不存在 You just can know User Info through a chat previously initiated.您只需通过之前发起的聊天即可了解用户信息。 So, you have to start a chat with this user first to call the API method mentioned.因此,您必须先与该用户开始聊天才能调用提到的 API 方法。 If you need to query the info later, you should store it, there is no another way that I know如果您以后需要查询信息,您应该存储它,我知道没有其他方法

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM