aboutsummaryrefslogtreecommitdiffstats
path: root/slack/slack_api.py
diff options
context:
space:
mode:
Diffstat (limited to 'slack/slack_api.py')
-rw-r--r--slack/slack_api.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/slack/slack_api.py b/slack/slack_api.py
index 5c6a230..d3e52e4 100644
--- a/slack/slack_api.py
+++ b/slack/slack_api.py
@@ -73,7 +73,8 @@ class SlackEdgeApi(SlackApiCommon):
return self.workspace.token_type == "session"
async def _fetch_edgeapi(self, method: str, params: EdgeParams = {}):
- url = f"https://edgeapi.slack.com/cache/{self.workspace.id}/{method}"
+ id_for_path = self.workspace.enterprise_id or self.workspace.id
+ url = f"https://edgeapi.slack.com/cache/{id_for_path}/{method}"
options = self._get_request_options()
options["postfields"] = json.dumps(params)
options["httpheader"] += "\nContent-Type: application/json"