{"id":13449363,"url":"https://github.com/slackapi/python-slack-sdk","last_synced_at":"2026-03-12T18:52:00.621Z","repository":{"id":23102592,"uuid":"26456792","full_name":"slackapi/python-slack-sdk","owner":"slackapi","description":"Slack Developer Kit for Python","archived":false,"fork":false,"pushed_at":"2026-01-13T00:11:01.000Z","size":15474,"stargazers_count":3994,"open_issues_count":46,"forks_count":850,"subscribers_count":156,"default_branch":"main","last_synced_at":"2026-01-13T00:19:17.912Z","etag":null,"topics":["aiohttp","aiohttp-client","asyncio","python","slack","slackapi","socket-mode","websocket","websocket-client","websockets"],"latest_commit_sha":null,"homepage":"https://docs.slack.dev/tools/python-slack-sdk/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/slackapi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2014-11-10T21:32:02.000Z","updated_at":"2026-01-12T19:08:29.000Z","dependencies_parsed_at":"2024-01-08T18:42:35.829Z","dependency_job_id":"f665975c-7295-40b9-a881-f8c53fa607d6","html_url":"https://github.com/slackapi/python-slack-sdk","commit_stats":{"total_commits":1240,"total_committers":170,"mean_commits":7.294117647058823,"dds":"0.46854838709677415","last_synced_commit":"86169dbe493662e031c6719a0c01b82df831220d"},"previous_names":["slackhq/python-slackclient","slackapi/python-slackclient"],"tags_count":160,"template":false,"template_full_name":null,"purl":"pkg:github/slackapi/python-slack-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slackapi%2Fpython-slack-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slackapi%2Fpython-slack-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slackapi%2Fpython-slack-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slackapi%2Fpython-slack-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slackapi","download_url":"https://codeload.github.com/slackapi/python-slack-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slackapi%2Fpython-slack-sdk/sbom","scorecard":{"id":830922,"data":{"date":"2025-08-11","repo":{"name":"github.com/slackapi/python-slack-sdk","commit":"7e3ab80cdfc4c257c2b46b630546d38920502064"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.7,"checks":[{"name":"Maintained","score":10,"reason":"20 commit(s) and 7 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":10,"reason":"all changesets reviewed","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":8,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'contents' permission set to 'read': .github/workflows/ci-build.yml:27","Info: jobLevel 'contents' permission set to 'read': .github/workflows/mypy.yml:17","Warn: no topLevel permission defined: .github/workflows/ci-build.yml:1","Warn: no topLevel permission defined: .github/workflows/mypy.yml:1","Warn: no topLevel permission defined: .github/workflows/triage-issues.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Vulnerabilities","score":0,"reason":"11 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-3ww4-gg4f-jr7f","Warn: Project is vulnerable to: GHSA-9v9h-cgj8-h64p","Warn: Project is vulnerable to: PYSEC-2021-62 / GHSA-hggm-jpg3-v476","Warn: Project is vulnerable to: PYSEC-2017-8 / GHSA-q3cj-2r34-2cwc","Warn: Project is vulnerable to: PYSEC-2024-225","Warn: Project is vulnerable to: PYSEC-2018-66 / GHSA-562c-5r94-xh97","Warn: Project is vulnerable to: PYSEC-2019-179 / GHSA-5wv5-4vpf-pj6m","Warn: Project is vulnerable to: PYSEC-2023-62 / GHSA-m2qf-hxjv-5gpq","Warn: Project is vulnerable to: PYSEC-2017-24 / GHSA-r9jw-mwhq-wp62","Warn: Project is vulnerable to: PYSEC-2022-202","Warn: Project is vulnerable to: GHSA-8cw9-5hmv-77w6"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":1,"reason":"dependency not pinned by hash detected -- score normalized to 1","details":["Warn: pipCommand not pinned by hash: scripts/build_pypi_package.sh:7","Warn: pipCommand not pinned by hash: scripts/build_pypi_package.sh:8","Warn: pipCommand not pinned by hash: scripts/deploy_to_prod_pypi_org.sh:7","Warn: pipCommand not pinned by hash: scripts/deploy_to_prod_pypi_org.sh:8","Warn: pipCommand not pinned by hash: scripts/deploy_to_test_pypi_org.sh:7","Warn: pipCommand not pinned by hash: scripts/deploy_to_test_pypi_org.sh:8","Warn: pipCommand not pinned by hash: scripts/generate_api_docs.sh:7","Warn: pipCommand not pinned by hash: scripts/generate_api_docs.sh:8","Warn: pipCommand not pinned by hash: scripts/run_integration_tests.sh:11","Warn: pipCommand not pinned by hash: scripts/run_integration_tests.sh:12","Warn: pipCommand not pinned by hash: scripts/run_mypy.sh:9","Warn: pipCommand not pinned by hash: scripts/run_mypy.sh:10","Warn: pipCommand not pinned by hash: scripts/run_unit_tests.sh:11","Warn: pipCommand not pinned by hash: scripts/run_unit_tests.sh:12","Warn: pipCommand not pinned by hash: scripts/run_validation.sh:10","Warn: pipCommand not pinned by hash: scripts/run_validation.sh:11","Warn: pipCommand not pinned by hash: .github/workflows/ci-build.yml:42","Warn: pipCommand not pinned by hash: .github/workflows/ci-build.yml:43","Warn: pipCommand not pinned by hash: .github/workflows/ci-build.yml:44","Warn: pipCommand not pinned by hash: .github/workflows/ci-build.yml:53","Info:   5 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   2 out of   2 third-party GitHubAction dependencies pinned","Info:   0 out of  20 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}}]},"last_synced_at":"2025-08-23T17:46:57.454Z","repository_id":23102592,"created_at":"2025-08-23T17:46:57.454Z","updated_at":"2025-08-23T17:46:57.454Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28473974,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T22:27:41.514Z","status":"ssl_error","status_checked_at":"2026-01-15T21:54:47.910Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aiohttp","aiohttp-client","asyncio","python","slack","slackapi","socket-mode","websocket","websocket-client","websockets"],"created_at":"2024-07-31T06:00:36.422Z","updated_at":"2026-01-18T07:16:52.852Z","avatar_url":"https://github.com/slackapi.png","language":"Python","readme":"\u003ch1 align=\"center\"\u003ePython Slack SDK\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/slackapi/python-slack-sdk/actions/workflows/ci-build.yml\"\u003e\n        \u003cimg alt=\"Tests\" src=\"https://img.shields.io/github/actions/workflow/status/slackapi/python-slack-sdk/ci-build.yml\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://codecov.io/gh/slackapi/python-slack-sdk\"\u003e\n        \u003cimg alt=\"Codecov\" src=\"https://img.shields.io/codecov/c/gh/slackapi/python-slack-sdk\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://pepy.tech/project/slack-sdk\"\u003e\n        \u003cimg alt=\"Pepy Total Downloads\" src=\"https://img.shields.io/pepy/dt/slack-sdk\"\u003e\u003c/a\u003e\n    \u003cbr\u003e\n    \u003ca href=\"https://pypi.org/project/slack-sdk/\"\u003e\n        \u003cimg alt=\"PyPI - Version\" src=\"https://img.shields.io/pypi/v/slack-sdk\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://pypi.org/project/slack-sdk/\"\u003e\n        \u003cimg alt=\"Python Versions\" src=\"https://img.shields.io/pypi/pyversions/slack-sdk.svg\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://docs.slack.dev/tools/python-slack-sdk/\"\u003e\n        \u003cimg alt=\"Documentation\" src=\"https://img.shields.io/badge/dev-docs-yellow\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nThe Slack platform offers several APIs to build apps. Each Slack API delivers part of the capabilities from the platform, so that you can pick just those that fit for your needs. This SDK offers a corresponding package for each of Slack’s APIs. They are small and powerful when used independently, and work seamlessly when used together, too.\n\n**Comprehensive documentation on using the Slack Python can be found at [https://docs.slack.dev/tools/python-slack-sdk/](https://docs.slack.dev/tools/python-slack-sdk/)**\n\n---\n\nWhether you're building a custom app for your team, or integrating a third party service into your Slack workflows, Slack Developer Kit for Python allows you to leverage the flexibility of Python to get your project up and running as quickly as possible.\n\nThe **Python Slack SDK** allows interaction with:\n\n- `slack_sdk.web`: for calling the [Web API methods][api-methods]\n- `slack_sdk.webhook`: for utilizing the [Incoming Webhooks](https://docs.slack.dev/messaging/sending-messages-using-incoming-webhooks/) and [`response_url`s in payloads](https://docs.slack.dev/interactivity/handling-user-interaction/#message_responses)\n- `slack_sdk.signature`: for [verifying incoming requests from the Slack API server](https://docs.slack.dev/authentication/verifying-requests-from-slack/)\n- `slack_sdk.socket_mode`: for receiving and sending messages over [Socket Mode](https://docs.slack.dev/apis/events-api/using-socket-mode/) connections\n- `slack_sdk.audit_logs`: for utilizing [Audit Logs APIs](https://docs.slack.dev/admins/audit-logs-api/)\n- `slack_sdk.scim`: for utilizing [SCIM APIs](https://docs.slack.dev/admins/scim-api/)\n- `slack_sdk.oauth`: for implementing the [Slack OAuth flow](https://docs.slack.dev/authentication/installing-with-oauth/)\n- `slack_sdk.models`: for constructing [Block Kit](https://docs.slack.dev/block-kit/) UI components using easy-to-use builders\n- `slack_sdk.rtm`: for utilizing the [RTM API][rtm-docs]\n\nIf you want to use our [Events API][events-docs] and Interactivity features, please check the [Bolt for Python][bolt-python] library. Details on the Tokens and Authentication can be found in our [Auth Guide](https://docs.slack.dev/tools/python-slack-sdk/installation/).\n\n## slackclient is in maintenance mode\n\nAre you looking for [slackclient](https://pypi.org/project/slackclient/)? The slackclient project is in maintenance mode now and this [`slack_sdk`](https://pypi.org/project/slack-sdk/) is the successor. If you have time to make a migration to slack_sdk v3, please follow [our migration guide](https://docs.slack.dev/tools/python-slack-sdk/v3-migration/) to ensure your app continues working after updating.\n\n## Table of contents\n\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Getting started tutorial](#getting-started-tutorial)\n* [Basic Usage of the Web Client](#basic-usage-of-the-web-client)\n  * [Sending a message to Slack](#sending-a-message-to-slack)\n  * [Uploading files to Slack](#uploading-files-to-slack)\n* [Async usage](#async-usage)\n  * [WebClient as a script](#asyncwebclient-in-a-script)\n  * [WebClient in a framework](#asyncwebclient-in-a-framework)\n* [Advanced Options](#advanced-options)\n  * [SSL](#ssl)\n  * [Proxy](#proxy)\n  * [DNS performance](#dns-performance)\n  * [Example](#example)\n* [Migrating from v1](#migrating-from-v1)\n* [Support](#support)\n* [Development](#development)\n\n### Requirements\n\n---\n\nThis library requires Python 3.7 and above. If you're unsure how to check what version of Python you're on, you can check it using the following:\n\n\u003e **Note:** You may need to use `python3` before your commands to ensure you use the correct Python path. e.g. `python3 --version`\n\n```bash\npython --version\n\n-- or --\n\npython3 --version\n```\n\n### Installation\n\nWe recommend using [PyPI][pypi] to install the Slack Developer Kit for Python.\n\n```bash\n$ pip install slack_sdk\n```\n\n### Getting started tutorial\n\n---\n\nWe've created this [tutorial](https://github.com/slackapi/python-slack-sdk/tree/main/tutorial) to build a basic Slack app in less than 10 minutes. It requires some general programming knowledge, and Python basics. It focuses on the interacting with the Slack Web API and RTM API. Use it to give you an idea of how to use this SDK.\n\n**[Read the tutorial to get started!](https://github.com/slackapi/python-slack-sdk/tree/main/tutorial)**\n\n### Basic Usage of the Web Client\n\n---\n\nSlack provide a Web API that gives you the ability to build applications that interact with Slack in a variety of ways. This Development Kit is a module based wrapper that makes interaction with that API easier. We have a basic example here with some of the more common uses but a full list of the available methods are available [here][api-methods]. More detailed examples can be found in [our guide](https://docs.slack.dev/tools/python-slack-sdk/web/).\n\n#### Sending a message to Slack\n\nOne of the most common use-cases is sending a message to Slack. If you want to send a message as your app, or as a user, this method can do both. In our examples, we specify the channel name, however it is recommended to use the `channel_id` where possible. Also, if your app's bot user is not in a channel yet, invite the bot user before running the code snippet (or add `chat:write.public` to Bot Token Scopes for posting in any public channels).\n\n```python\nimport os\nfrom slack_sdk import WebClient\nfrom slack_sdk.errors import SlackApiError\n\nclient = WebClient(token=os.environ['SLACK_BOT_TOKEN'])\n\ntry:\n    response = client.chat_postMessage(channel='#random', text=\"Hello world!\")\n    assert response[\"message\"][\"text\"] == \"Hello world!\"\nexcept SlackApiError as e:\n    # You will get a SlackApiError if \"ok\" is False\n    assert e.response[\"ok\"] is False\n    assert e.response[\"error\"]  # str like 'invalid_auth', 'channel_not_found'\n    print(f\"Got an error: {e.response['error']}\")\n    # Also receive a corresponding status_code\n    assert isinstance(e.response.status_code, int)\n    print(f\"Received a response status_code: {e.response.status_code}\")\n```\n\nHere we also ensure that the response back from Slack is a successful one and that the message is the one we sent by using the `assert` statement.\n\n#### Uploading files to Slack\n\nWe've changed the process for uploading files to Slack to be much easier and straight forward. You can now just include a path to the file directly in the API call and upload it that way.\n\n```python\nimport os\nfrom slack_sdk import WebClient\nfrom slack_sdk.errors import SlackApiError\n\nclient = WebClient(token=os.environ['SLACK_BOT_TOKEN'])\n\ntry:\n    filepath=\"./tmp.txt\"\n    response = client.files_upload_v2(channel='C0123456789', file=filepath)\n    assert response[\"file\"]  # the uploaded file\nexcept SlackApiError as e:\n    # You will get a SlackApiError if \"ok\" is False\n    assert e.response[\"ok\"] is False\n    assert e.response[\"error\"]  # str like 'invalid_auth', 'channel_not_found'\n    print(f\"Got an error: {e.response['error']}\")\n```\n\nMore details on the `files_upload_v2` method can be found [here][files_upload_v2].\n\n### Async usage\n\n`AsyncWebClient` in this SDK requires [AIOHttp][aiohttp] under the hood for asynchronous requests.\n\n#### AsyncWebClient in a script\n\n```python\nimport asyncio\nimport os\nfrom slack_sdk.web.async_client import AsyncWebClient\nfrom slack_sdk.errors import SlackApiError\n\nclient = AsyncWebClient(token=os.environ['SLACK_BOT_TOKEN'])\n\nasync def post_message():\n    try:\n        response = await client.chat_postMessage(channel='#random', text=\"Hello world!\")\n        assert response[\"message\"][\"text\"] == \"Hello world!\"\n    except SlackApiError as e:\n        assert e.response[\"ok\"] is False\n        assert e.response[\"error\"]  # str like 'invalid_auth', 'channel_not_found'\n        print(f\"Got an error: {e.response['error']}\")\n\nasyncio.run(post_message())\n```\n\n#### AsyncWebClient in a framework\n\nIf you are using a framework invoking the asyncio event loop like : sanic/jupyter notebook/etc.\n\n```python\nimport os\nfrom slack_sdk.web.async_client import AsyncWebClient\nfrom slack_sdk.errors import SlackApiError\n\nclient = AsyncWebClient(token=os.environ['SLACK_BOT_TOKEN'])\n# Define this as an async function\nasync def send_to_slack(channel, text):\n    try:\n        # Don't forget to have await as the client returns asyncio.Future\n        response = await client.chat_postMessage(channel=channel, text=text)\n        assert response[\"message\"][\"text\"] == text\n    except SlackApiError as e:\n        assert e.response[\"ok\"] is False\n        assert e.response[\"error\"]  # str like 'invalid_auth', 'channel_not_found'\n        raise e\n\nfrom aiohttp import web\n\nasync def handle_requests(request: web.Request) -\u003e web.Response:\n    text = 'Hello World!'\n    if 'text' in request.query:\n        text = \"\\t\".join(request.query.getall(\"text\"))\n    try:\n        await send_to_slack(channel=\"#random\", text=text)\n        return web.json_response(data={'message': 'Done!'})\n    except SlackApiError as e:\n        return web.json_response(data={'message': f\"Failed due to {e.response['error']}\"})\n\n\nif __name__ == \"__main__\":\n    app = web.Application()\n    app.add_routes([web.get(\"/\", handle_requests)])\n    # e.g., http://localhost:3000/?text=foo\u0026text=bar\n    web.run_app(app, host=\"0.0.0.0\", port=3000)\n```\n\n### Advanced Options\n\n#### SSL\n\nYou can provide a custom SSL context or disable verification by passing the `ssl` option, supported by both the RTM and the Web client.\n\nFor async requests, see the [AIOHttp SSL documentation](https://docs.aiohttp.org/en/stable/client_advanced.html#ssl-control-for-tcp-sockets).\n\nFor sync requests, see the [urllib SSL documentation](https://docs.python.org/3/library/urllib.request.html#urllib.request.urlopen).\n\n#### Proxy\n\nA proxy is supported when making async requests, pass the `proxy` option, supported by both the RTM and the Web client.\n\nFor async requests, see [AIOHttp Proxy documentation](https://docs.aiohttp.org/en/stable/client_advanced.html#proxy-support).\n\nFor sync requests, setting either `HTTPS_PROXY` env variable or the `proxy` option works.\n\n#### DNS performance\n\nUsing the async client and looking for a performance boost? Installing the optional dependencies (aiodns) may help speed up DNS resolving by the client. We've included it as an extra called \"optional\":\n```bash\n$ pip install slack_sdk[optional]\n```\n\n#### Example\n\n```python\nimport os\nfrom slack_sdk import WebClient\nfrom ssl import SSLContext\n\nsslcert = SSLContext()\n# pip3 install proxy.py\n# proxy --port 9000 --log-level d\nproxyinfo = \"http://localhost:9000\"\n\nclient = WebClient(\n    token=os.environ['SLACK_BOT_TOKEN'],\n    ssl=sslcert,\n    proxy=proxyinfo\n)\nresponse = client.chat_postMessage(channel=\"#random\", text=\"Hello World!\")\nprint(response)\n```\n\n### Migrating from v2\n\nIf you're migrating from slackclient v2.x of slack_sdk to v3.x, Please follow our migration guide to ensure your app continues working after updating.\n\n**[Check out the Migration Guide here!](https://docs.slack.dev/tools/python-slack-sdk/v3-migration/)**\n\n### Migrating from v1\n\nIf you're migrating from v1.x of slackclient to v2.x, Please follow our migration guide to ensure your app continues working after updating.\n\n**[Check out the Migration Guide here!](https://github.com/slackapi/python-slack-sdk/wiki/Migrating-to-2.x)**\n\n### Support\n\n---\n\nIf you get stuck, we’re here to help. The following are the best ways to get assistance working through your issue:\n\nUse our [Github Issue Tracker][gh-issues] for reporting bugs or requesting features.\nVisit the [Slack Community][slack-community] for getting help using Slack Developer Kit for Python or just generally bond with your fellow Slack developers.\n\n### Contributing\n\nWe welcome contributions from everyone! Please check out our\n[Contributor's Guide](.github/contributing.md) for how to contribute in a\nhelpful and collaborative way.\n\n\u003c!-- Markdown links --\u003e\n\n[slackclientv1]: https://github.com/slackapi/python-slackclient/tree/v1\n[api-methods]: https://docs.slack.dev/reference/methods\n[rtm-docs]: https://docs.slack.dev/legacy/legacy-rtm-api/\n[events-docs]: https://docs.slack.dev/apis/events-api/\n[bolt-python]: https://github.com/slackapi/bolt-python\n[pypi]: https://pypi.org/\n[gh-issues]: https://github.com/slackapi/python-slack-sdk/issues\n[slack-community]: https://slackcommunity.com/\n[files_upload_v2]: https://github.com/slackapi/python-slack-sdk/releases/tag/v3.19.0\n[aiohttp]: https://aiohttp.readthedocs.io/\n\n","funding_links":[],"categories":["Python",":hammer_and_wrench: \u0026nbsp; Libraries and SDKs","Third-party Web APIs","شبکه های اجتماعی"],"sub_categories":["Python","کار با زمان و تقویم"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslackapi%2Fpython-slack-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslackapi%2Fpython-slack-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslackapi%2Fpython-slack-sdk/lists"}