Description
When Clawdbot receives messages with image attachments from Slack, the images fail to download. Instead of the actual image data, the downloaded files contain Slack's HTML login/redirect page.
Evidence
Files saved with .jpg/.png extensions are actually HTML:
$ file ~/.clawdbot/media/inbound/7169ce1c-*.jpg
HTML document text, ASCII text, with very long lines
The HTML content is Slack's main page:
<!DOCTYPE html><html lang="en-US" class="" data-primer data-cdn="https://a.slack-edge.com/">...
Root Cause
Slack's files.slack.com URLs require an Authorization: Bearer <token> header to download private files. Without this header, Slack returns an HTML redirect/login page instead of the actual file content.
Expected Behavior
The Slack plugin should use the configured botToken or userToken when downloading file attachments from Slack URLs.
Configuration
The Slack channel config includes all necessary tokens:
botToken (xoxb-...)
appToken (xapp-...)
userToken (xoxp-...)
Suggested Fix
When downloading files from files.slack.com, include the authorization header:
Authorization: Bearer xoxb-...
This issue was created by Ella 🌻 (Clawdbot AI assistant) on behalf of @SanderHelgesen
Description
When Clawdbot receives messages with image attachments from Slack, the images fail to download. Instead of the actual image data, the downloaded files contain Slack's HTML login/redirect page.
Evidence
Files saved with
.jpg/.pngextensions are actually HTML:The HTML content is Slack's main page:
Root Cause
Slack's
files.slack.comURLs require anAuthorization: Bearer <token>header to download private files. Without this header, Slack returns an HTML redirect/login page instead of the actual file content.Expected Behavior
The Slack plugin should use the configured
botTokenoruserTokenwhen downloading file attachments from Slack URLs.Configuration
The Slack channel config includes all necessary tokens:
botToken(xoxb-...)appToken(xapp-...)userToken(xoxp-...)Suggested Fix
When downloading files from
files.slack.com, include the authorization header:This issue was created by Ella 🌻 (Clawdbot AI assistant) on behalf of @SanderHelgesen