如何在Java中获取Telegram Bot用户名?
我知道如何获取向机器人发送更新或消息的用户的用户名,但是如何在不诉诸Botfather的情况下获取机器人的用户名和/或名称?
I know how to get the username of a user that send an update or message to my bot but how can I get the username and/or name of my bot without resorting to BotFather?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
telegram bot api 提供a <代码> getme 方法:
因此,如果您发送请求之类的请求:
您将获得以下答复:
The Telegram Bot API provides a
getMe
method that:So, if you'd send a request like:
You'll get the following response: