Slack · sdk · fg-0359

files_upload_v2 fails with invalid_channel when given a channel name or user ID

If you see {'ok': False, 'error': 'invalid_channel', 'channel': '#my_channel'}, the cause and the fix for Slack are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
{'ok': False, 'error': 'invalid_channel', 'channel': '#my_channel'}The same channel value worked with the old files_uploadUploaded file exists but is shared to no channel when channel is omitted
Cause
The v2 helpers call files.completeUploadExternal, which accepts only a conversation ID, not a channel name or a user ID. Slack maintainers confirmed name support was left out on purpose. With no channel the file is uploaded but stays private.
Fix
Resolve the conversation ID first. For a DM, open it with conversations.open and pass the returned channel ID.
Apply
dm = client.conversations_open(users=user_id)["channel"]["id"] client.files_upload_v2(channel=dm, file="out.csv")
Affected
python-slack-sdk 3.19 and later, Node filesUploadV2, Java uploadV2; all versions as of 2026-10
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun