MCPcopy Index your code
hub / github.com/slackapi/python-slack-sdk / per_request

Function per_request

integration_tests/samples/issues/issue_497.py:45–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43
44@app.route("/sync/per-request", methods=["GET"])
45def per_request():
46 try:
47 client = WebClient(token=os.environ["SLACK_BOT_TOKEN"], run_async=False)
48 response = client.chat_postMessage(channel="#random", text="You used a new WebClient for posting this message!")
49 return str(response)
50 except SlackApiError as e:
51 return make_response(str(e), 400)
52
53
54# This doesn't work

Callers

nothing calls this directly

Calls 2

chat_postMessageMethod · 0.95
WebClientClass · 0.90

Tested by

no test coverage detected