From 1501895d66250679a7fe2a5bd67b368e96965401 Mon Sep 17 00:00:00 2001 From: Trygve Aaberge Date: Sat, 9 Mar 2024 13:08:11 +0100 Subject: Use enterprise id in edgeapi path if it exists It seems like for enterprise workspaces you have to use the enterprise id (if the token is a workspace level token, `enterprise_id/workspace_id` can also be used, but isn't necessary), while for non-enterprise workspaces the workspace id should be used. --- slack/slack_workspace.py | 1 + 1 file changed, 1 insertion(+) (limited to 'slack/slack_workspace.py') diff --git a/slack/slack_workspace.py b/slack/slack_workspace.py index faa0d73..99bd8aa 100644 --- a/slack/slack_workspace.py +++ b/slack/slack_workspace.py @@ -261,6 +261,7 @@ class SlackWorkspace: async def _connect_oauth(self) -> List[SlackConversation]: rtm_connect = await self.api.fetch_rtm_connect() self.id = rtm_connect["team"]["id"] + self.enterprise_id = rtm_connect["team"].get("enterprise_id") self.domain = rtm_connect["team"]["domain"] self.my_user = await self.users[rtm_connect["self"]["id"]] -- cgit