尝试在Django应用程序中集成slack时出错?

2024-10-04 05:30:33 发布

您现在位置:Python中文网/ 问答频道 /正文

实际上,我的要求是将slack集成到我现有的django应用程序中 为此,我采取了以下步骤

  1. 我在api.slack.com上创建了slack应用程序

  2. 我遵循了django软件包教程https://pypi.org/project/django-slack-oauth/

  3. 所以我在模板中包含了像这样的“放松”按钮 像这样<a href='{% url 'slack_auth' %}'>Get slacked</a> 当我单击此按钮时,我的网页中的错误为

Something went wrong when authorizing this app.
Try going back and authorizing again. If problems persist, contact support for help.

Error details
Invalid client_id parameter

当我点击Get slack时,它重定向的页面的url是https://slack.com/oauth/authorize?client_id=None&redirect_uri=http%3A%2F%2F127.0.0.1%3A8000%2Fslack%2Flogin%2F&scope=admin%2Cbot&state=791cc2&tracked=1

有人能帮我解决这个问题吗

当我创建一个应用程序时,我已经在重定向URL部分包含了这个https://slack.com/oauth/authorize

你能说一下如何在url中包含客户端id重定向uri作用域状态吗


Tags: djangohttpscomclientid应用程序urlget