为电报机器人设置webhook和什么是自签名证书 [英] set webhook for telegram bot and what is self sign certificate

查看:194
本文介绍了为电报机器人设置webhook和什么是自签名证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过以下方式为我的电报机器人设置了webHook:

I set webHook for my telegram bot by this :

> https://api.telegram.org/bot<Token>/setWebhook?url=https://mywebapp.com/index.jsp

我没有为此设置任何证书. 但是当我(或电报用户)向该漫游器发送消息时, https://mywebapp.com/index.jsp 没有任何请求!当我向机器人发送任何消息时, https://mywebapp.com/index.jsp都没有收到请求.我该怎么办? Telegram Bot Webhook是否需要证书?

I don't set any certificate for this. But when I (or a telegram user) send message to this bot, https://mywebapp.com/index.jsp does not get any request!! when I send any kind of message to robot, no request gotten by https://mywebapp.com/index.jsp. What should I do? Is certificate necessary for telegram bot webhook?

推荐答案

  • 您需要有效的SSL证书才能使Webhook正常工作.
  • 要使用自签名证书,您需要上传公共密钥证书-使用setWebhook中的certificate参数.请上传为InputFile,-发送字符串无效.
  • Webhooks当前支持的端口:443、80、88、8443.
  • 可能不支持通配符证书.
  • 不支持重定向.
  • CN必须与您的域完全匹配.
    • You need a valid SSL certificate for webhooks to work.
    • To use a self-signed certificate, you need to upload your public key certificate - using the certificate parameter in setWebhook. Please upload as InputFile, - sending a String will not work.
    • Ports currently supported for Webhooks: 443, 80, 88, 8443.
    • Wildcard certificates may not be supported.
    • Redirects are not supported.
    • CN must exactly match your domain.
    • 这篇关于为电报机器人设置webhook和什么是自签名证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆