Skip to content

Slack plugin: Image downloads fail due to missing Authorization header #1936

@SanderHelgesen

Description

@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/.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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions