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": "",
            "url_private_download": "",
            "thumb_64": "",
            "thumb_80": "",
            "thumb_360": "",
            "thumb_360_w": 360,
            "thumb_360_h": 360,
            "thumb_480": "",
            "thumb_480_w": 480,
            "thumb_480_h": 480,
            "thumb_160": "",
            "image_exif_rotation": 1,
            "original_w": 512,
            "original_h": 512,
            "pjpeg": "",
            "permalink": "",
            "permalink_public": "",
            "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.

Was this page helpful?