Slack-sdk

Latest version: v3.34.0

Safety actively analyzes 706267 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 6 of 23

3.19.5

Changes

* 1303 Fix 1302 by updating the warning logs in WebClient to be consistent with Node SDK - Thanks mar3mar3
* 1307 Fix 1304 ssl_context is not passed from async web_client to aiohttp socket client - Thanks seratch giwrgos-skouras
* 1308 Fix 1305 by fixing pagination with async for syntax - Thanks seratch WilliamYuhangLee

---
* All issues/pull requests: https://github.com/slackapi/python-slack-sdk/milestone/75?closed=1
* All changes: https://github.com/slackapi/python-slack-sdk/compare/v3.19.4...v3.19.5

3.19.4

Changes

* 1301 Fix 1297 Building user_auth_blocks with slack_sdk.models class objects for chat.unfurl API call fails - Thanks seratch injust

---
* All issues/pull requests: https://github.com/slackapi/python-slack-sdk/milestone/73?closed=1
* All changes: https://github.com/slackapi/python-slack-sdk/compare/v3.19.3...v3.19.4

3.19.3

Changes

* 1288 Add datetimepicker, url, email, number block elements - Thanks WilliamBergamin
* 1294 Fix 1292 files_upload_v2 does not work with io.BytesIO file parameters - Thanks seratch
* 1290 Update RTM API documents - Thanks ryan-aldaz

---
* All issues/pull requests: https://github.com/slackapi/python-slack-sdk/milestone/72?closed=1
* All changes: https://github.com/slackapi/python-slack-sdk/compare/v3.19.2...v3.19.3

3.19.2

Changes

* 1282 Add request_file_info arg to files_upload_v2 method - Thanks seratch eddyg
* 1278 Improve clarity of 'content' error message for files_upload_v2 - Thanks eddyg
* 1283 Improve typing when using 'get' on an API response - Thanks eddyg
* 1284 Add Python 3.11 support - Thanks seratch
* 1281 Fix selected_option type hint - Thanks taekop

---
* All issues/pull requests: https://github.com/slackapi/python-slack-sdk/milestone/71?closed=1
* All changes: https://github.com/slackapi/python-slack-sdk/compare/v3.19.1...v3.19.2

3.19.1

Changes

* Improve `WebClientfiles_upload_v2()` to use given filename as the default title value - Thanks seratch mattpr

---
* All changes: https://github.com/slackapi/python-slack-sdk/compare/v3.19.0...v3.19.1

3.19.0

New Features

files.upload v2 in `WebClient` / `AsyncWebClient`

We've received many reports on the performance issue of the existing `files.upload` API (refer to 1191 1165 for details). So, to cope with the problem, our platform team decided to unlock a new way to upload files to Slack via public APIs. To utilize the new approach, developers need to implement the following steps on their code side:

1. Call `WebClientfiles_getUploadURLExternal()` method to receive a URL to use for each file
2. Perform an HTTP POST request to the URL you received in step 1 for each file
3. Call `WebClientfiles_completeUploadExternal()` method with the pairs of file ID and title to complete the whole process, plus share the files in a channel
4. ~~If you need the full metadata of the files, call `WebClientfiles_info()` method for each file~~ **UPDATE:** Since v3.23.0, this API call is no longer required

We do understand that writing the above code requires many lines of code. Also, the existing `WebClientfiles_upload()` users have to take a certain amount of time for migration. To mitigate the pain, we've added a wrapper method named `WebClientfiles_upload_v2()` on the SDK side.

Also, in addition to the performance improvements, another good news is that 3rd party apps can now upload multiple files at a time!

See the following code examples demonstrating how the wrapper method works:

python
import os
from slack_sdk import WebClient
client = WebClient(token=os.environ["SLACK_BOT_TOKEN"])

Legacy way
response = client.files_upload(
file="./logo.png",
title="New company logo",
channels=["C12345"],
initial_comment="Here is the latest version of our new company logo :wave:",
)
response.get("file") returns the full metadata of the uploaded file

New way - the same parameters works in most cases
response = client.files_upload_v2(
file="./logo.png",
title="New company logo",
Note that channels still works but going with channel="C12345" is recommended
channels=["C111", "C222"] is no longer supported. In this case, an exception can be thrown
channels=["C12345"],
initial_comment="Here is the latest version of our new company logo :wave:",
)
response.get("file") returns the full metadata of the uploaded file

New way with multiple files!
response = client.files_upload_v2(
file_uploads=[
{
"file": "./logo.png",
"title": "New company logo",
},
{
"content": "Minutes ....",
"filename": "team-meeting-minutes-2022-03-01.md",
"title": "Team meeting minutes (2022-03-01)",
},
],
channel="C12345",
initial_comment="Here is the latest version of our new company logo :wave:",
)
response.get("files") returns the full metadata of all the uploaded files


~~When migrating to the v2 method, please note that **the new method requires both `files:write` and `files:read` scopes**. If your existing apps have only `files:write` scope for uploading files, you need to add `files:read` to the scopes plus re-install the app to issue an updated token.~~ **UPDATE:** Since v3.23.0, `files:read` scope is no longer required.

Changes

* 1272 Add files.upload v2 support, which resolves 1191 1165 - Thanks seratch

---
* All issues/pull requests: https://github.com/slackapi/python-slack-sdk/milestone/64?closed=1
* All changes: https://github.com/slackapi/python-slack-sdk/compare/v3.18.5...v3.19.0

Page 6 of 23

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.