简体   繁体   English

使用 python 连接到请求 URL 时,挑战值没有响应

[英]Challenge value not responding when connecting to request URL using python

I am trying to connect to my request URL in slack but it does not respond with the challenge value like it is supposed to.我正在尝试以 slack 连接到我的请求 URL,但它没有像应有的那样响应挑战值。 This has never been an issue before and I have not changed the code so i'm very confused why I have this.这以前从来不是问题,我没有更改代码,所以我很困惑为什么我有这个。 There is no message in the ngrok terminal either or the python code terminal. ngrok 终端或 python 代码终端中没有消息。

在此处输入图像描述

It is entirely possible the reason this is happening to you is because the events request URL you are using is following http rather than https.发生这种情况的原因完全有可能是因为您使用的事件请求 URL 遵循的是 http 而不是 https。

The Slack events API documentation ( https://api.slack.com/apis/connections/events-api ) lists failure conditions, which include the statement: Slack 事件 API 文档 ( https://api.slack.com/apis/connections/events-api ) 列出了失败条件,其中包括以下语句:

We consider any of these scenarios a single failure condition:我们将这些场景中的任何一种都视为单一故障条件:

  • we are unable to negotiate or validate your server's SSL certificate我们无法协商或验证您服务器的 SSL 证书

No SSL certificate would be present with an http connection, so the solution for you may be to use an https url for your endpoint (which, in your case, should be provided by ngrok alongside the http url they give you). http 连接不存在 SSL 证书,因此您的解决方案可能是为您的端点使用 https url(在您的情况下,应该由 ngrok 与他们给您的 http url 一起提供)。

As to why the previous request URL shows as verified (or why http may work some of the time), this is a problem I have run into myself.至于为什么之前的请求 URL 显示为已验证(或者为什么 http 有时会起作用),这是我自己遇到的一个问题。 In my experience, it sometimes happens when I use the App Manifest feature, or when I set the app's distribution to public (which would enforce https for all endpoints).根据我的经验,当我使用 App Manifest 功能或将应用程序的分发设置为公共(这将对所有端点强制使用 https)时,有时会发生这种情况。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM