[英]How do i receive JSON payloads from the slack API to retrieve messages using python?
I have been trying to make a slack bot for quite some time but there seems to be very little documentation on the slack URL, the most in-depth instructions I have found is to use ngrok and then you should receive JSON payloads from the slack API但由于我是初学者程序员,我对此知之甚少。 我使用了一个ngrok https URL 并附加了 /slack/actions 记录在 slack 中,并尝试了一小段代码来查看 ZE6B391A8D2C4D45902A23A8B658 的有效载荷是否正常
import requests
r = requests.get('https://f39b39ebcdbf.ngrok.io/slack/actions')
print(r)
我收到了 405 错误
所以我不确定我需要什么代码来接收这些有效载荷,因为你可能会说我在这方面很新,所以任何帮助将不胜感激
使用 POST 方法而不是 GET。 使用 URL 喜欢: https://xxxxxx.ngrok.io/api/YourSlackReceviver/Action
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.