如何为API调用的Slack应用程序进行身份验证?

发布于 2025-02-09 00:53:58 字数 296 浏览 1 评论 0原文

好的,所以,通常我不会问这样一个简单的问题,但是我真的不了解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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

岁月流歌 2025-02-16 00:53:58

您需要 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文