Slack · sdk · fg-0359

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

{'ok': False, 'error': 'invalid_channel', 'channel': '#my_channel'}

Verified 2026-10-15 · Confirmed by 0 builders · Trust 50/100

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")

Affects: python-slack-sdk 3.19 and later, Node filesUploadV2, Java uploadV2; all versions as of 2026-10

Sources

Have your agent know this before it fails

claude mcp add --transport http footgun https://getfootgun.com/api/mcp