无论如何用于设置Telegram Webhook而不设置https连接 [英] Anyway for setting Telegram Webhook without setting up https connection
问题描述
我想设置Telegram
Webhook
,但是我没有https
URL,我也不想处理ssl证书.
I want to setup Telegram
Webhook
but I don't have https
URL, I don't want to deal with ssl certificates either.
是否可以通过使用https URL或不设置https
证书来解决此问题?
Can I solve this problem by using https URL or without setting https
certificate up?
电报Webhook描述: https://core.telegram.org/bots/api#setwebhook
Telegram webhook desc: https://core.telegram.org/bots/api#setwebhook
推荐答案
https
是强制性的,但这并不意味着您必须完全设置它.您可以使用更简单的方法,让我解释一下:
https
is mandatory but it doesn't mean you MUST set it up completely. You can use more more simple ways, let me explain:
您可以将自己的PC或Mac或Linux计算机上的本地主机服务器连接到电报服务器,而无需设置任何SSL证书. 使用
You can connect your localhost server on your own PC or mac or linux machine, to telegram severs without setting any SSL Certificates. With using
您需要的所有步骤(在PC中):
All steps you need (in PC):
1-下载ngrok.exe
1- Download ngrok.exe
2-在命令行中运行:"ngrok http 8888"
2- Run in command line : "ngrok http 8888"
3-现在准备好了!
很简单,不是吗
运行ngrok.exe后,它显示出类似以下内容:" https://abcd1234.ngrok.io "
这是您的临时https,可以用作webhook.它有效并且在您关闭ngrok.exe
之前属于您的机器人(我什至可以在不关闭应用程序的情况下待机我的电脑,它对我来说仍然很出色)
After running ngrok.exe it shows you somthing like: "https://abcd1234.ngrok.io"
This is your temporary https that you can use as webhook. It is valid and belong to your bot until you close ngrok.exe
( I even standby my computer without closing app and it remains for me-excellent)
此外,使用此应用程序,我还可以访问Telegram发送给我的机器人的所有消息以及我的bot api输出(不包括我发送的消息)作为JSON显示.您可以通过http://localhost.com:4040
访问这些面板.这是一个示例:
Additionally with this app i have access to all messages that Telegram send to my bot and my bot api outputs (not include my sent message) as JSON show. You can access to these panel via http://localhost.com:4040
. This is a sample:
这篇关于无论如何用于设置Telegram Webhook而不设置https连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!