如何为API调用的Slack应用程序进行身份验证?
好的,所以,通常我不会问这样一个简单的问题,但是我真的不了解Slack的身份验证方案。
我的问题非常简单,我只想做:user_list = client.users_list()
我的问题?我如何验证?
from slack_sdk import WebClient
client = WebClient() # <== ???????
user_list = client.users_list()
print(user_list)
谢谢 :)
Ok, so, normally I won't ask such a -on the surface- simple question, but I really don't understand Slack's authentication scheme.
My question is super simple, I just want to do: user_list = client.users_list()
My question? How do I authenticate?
from slack_sdk import WebClient
client = WebClient() # <== ???????
user_list = client.users_list()
print(user_list)
Thanks :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要 install 在您获得访问令牌之前,该应用程序您将用来对API进行身份验证您的应用程序。
如果您将其安装在单个工作空间上,则可以单击应用程序的配置页面中的一个按钮,但是如果您要在多个工作区域安装它,则需要构建 oauth flow 。
You need to install the app to a workspace before you can get an access token, which is what you'll use to authenticate your app to the API.
If you're installing it on a single workspace, there's a button you can click in your app's configuration page, but if you're installing it across multiple workspaces, you'll need to build out an OAuth flow.