如何通过Telegram Bot API从电报用户获取联系电话?

发布于 2025-01-30 09:21:54 字数 97 浏览 5 评论 0原文

电报机器人启动机器人后是否有可能获取用户的电话号码(无明确要求用户输入其联系方式)?

如果是这样,如何使用Telegram Bot API或任何其他方法来实现此目标?

Is it possible for telegram bots to obtain the user's phone number after they have started the bot (without explicitly asking the user to input their contact details)?

If so, how do I achieve this using Telegram bot api or any other method?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

百变从容 2025-02-06 09:21:54

出于隐私原因,这绝对是不可能的。

这些都是机器人对用户的了解:

字段类型
IDInteger
is_botboolean
first_namestring
last last_namestring
usernamestring
langagum_join_join_groupsstring
can_join_groupsboolean boolean
can_read_alre_group_group_group_messagesboolean
sidess_inline_inlinelline_erecoriesboorean boorean boorean boorean boorean

For privacy reasons, it's absolutely impossible.

These are everything that bot knows about a user:

FieldType
idInteger
is_botBoolean
first_nameString
last_nameString
usernameString
language_codeString
can_join_groupsBoolean
can_read_all_group_messagesBoolean
supports_inline_queriesBoolean

https://core.telegram.org/bots/api#user

姐不稀罕 2025-02-06 09:21:54

我发现您的询问是随机的,

您必须发送用户键盘button ,但是按钮必须具有选项“ request_contact” = true

docs screenShot

https://core.telegram.org/bots/api#keyboardbobledbutton

I found your asking randomly

You must send user KeyboardButton, but Button must have option "request_contact" = true.

Screenshot from docs

https://core.telegram.org/bots/api#keyboardbutton

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文