Go to Slack

file_share message event

A file was shared into a channel

Compatibility: RTM


{
    "type": "message",
    "text": "We got one!",
    "files": [
        {
            "id": "F0RDC39U1",
            "created": 1529342081,
            "timestamp": 1529342081,
            "name": "ghostrap.png",
            "title": "ghostrap.png",
            "mimetype": "image/png",
            "filetype": "png",
            "pretty_type": "PNG",
            "user": "U061F7AUR",
            "editable": false,
            "size": 196920,
            "mode": "hosted",
            "is_external": false,
            "external_type": "",
            "is_public": false,
            "public_url_shared": false,
            "display_as_bot": false,
            "username": "",
            "url_private": "https://files.slack.com/files-pri/T061EG9R6-F0RDC39U1/ghostrap.png",
            "url_private_download": "https://files.slack.com/files-pri/T061EG9R6-F0RDC39U1/download/ghostrap.png",
            "thumb_64": "https://files.slack.com/files-tmb/T061EG9R6-F0RDC39U1-f8c7b072da/ghostrap_64.png",
            "thumb_80": "https://files.slack.com/files-tmb/T061EG9R6-F0RDC39U1-f8c7b072da/ghostrap_80.png",
            "thumb_360": "https://files.slack.com/files-tmb/T061EG9R6-F0RDC39U1-f8c7b072da/ghostrap_360.png",
            "thumb_360_w": 360,
            "thumb_360_h": 360,
            "thumb_480": "https://files.slack.com/files-tmb/T061EG9R6-F0RDC39U1-f8c7b072da/ghostrap_480.png",
            "thumb_480_w": 480,
            "thumb_480_h": 480,
            "thumb_160": "https://files.slack.com/files-tmb/T061EG9R6-F0RDC39U1-f8c7b072da/ghostrap_160.png",
            "image_exif_rotation": 1,
            "original_w": 512,
            "original_h": 512,
            "pjpeg": "https://files.slack.com/files-tmb/T061EG9R6-F0RDC39U1-f8c7b072da/ghostrap_pjpeg.jpg",
            "permalink": "https://episod-slackform.slack.com/files/U061F7AUR/F0RDC39U1/ghostrap.png",
            "permalink_public": "https://slack-files.com/T061EG9R6-F0RDC39U1-815d735817",
            "has_rich_preview": false
        }
    ],
    "user": "U061F7AUR",
    "upload": true,
    "display_as_bot": false,
    "bot_id": null,
    "ts": "1529342088.000086",
    "channel": "D0L4B9P0Q",
    "event_ts": "1529342088.000086",
    "channel_type": "im"
}

A file_share message is sent when a file is shared into a channel, group or direct message.

File threads are here

A new file commenting experience arrived on July 23, 2018. Learn more about what's new and the migration path for apps already working with files and file comments.

This event will be deprecated in July 2018. In the RTM API, it will no longer dispatch. In the Events API, subscriptions and deliveries will continue until further notice.

However, the shape of the event has changed: instead of including a file node, you'll find an array in the files attribute instead.

Field notes

The user property contains the User ID of the user that shared the file, which may differ from the user that uploaded the file.

The upload property indicates whether this share happened at upload time, or some time later.

The files property contains an array of tidy file objects.