Skip to main content

file_mention message

A file was mentioned in a channel

Facts

Required Scopes
No scopes required!
Compatible APIs

Usage info

This example includes both the event wrapper and the event structure for the file_mention message subtype event.

{
"token": "XXYYZZ",
"team_id": "T123ABC456",
"api_app_id": "A123ABC456",
"event": {
"type": "message",
"subtype": "file_mention",
"ts": "1358877455.000010",
"text": "<@cal> mentioned a file: <https:...7.png|7.png>",
"file": {},
"user": "U2147483697"
},
"type": "event_callback",
"authed_users": [
"U123ABC456",
"U222222222"
],
"event_id": "Ev123ABC456",
"event_time": 123456789
}

A file_mention message is sent when a file is mentioned in a channel, group or direct message.

The file property contains a file object. The user property contains the User ID of the user that mentioned the file (which may differ from the user that uploaded the file).