[英]How can I see in telegram bot incoming POST request from java web app
I have a web application.我有一个 web 应用程序。
I'm sending some photo to telegram bot using:我正在使用以下方式向电报机器人发送一些照片:
https://api.telegram.org/<token>/sendPhoto.
By executing this command from my web app, bot receiving image.通过从我的 web 应用程序执行此命令,机器人接收图像。
How can I make bot react on this incoming events?如何让机器人对这些传入事件做出反应?
Unfortunately, you can only use query strings with the availed methods to send messages/photos from a bot to a specified user ie不幸的是,您只能使用带有可用方法的查询字符串将消息/照片从机器人发送到指定用户,即
https://api.telegram.org/bot<token>/sendMessage?chat_id=<id>&text=<string>
Hitting the endpoint below opens your bot in the telegram web app which is not helpful in your situation点击下面的端点会在电报 web 应用程序中打开您的机器人,这对您的情况没有帮助
https://telegram.me/<botNname>?start
Bottom line is that you cannot send updates to a bot using a URL,底线是您不能使用 URL 向机器人发送更新,
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.