This method returns a list of all reactions for a single item (file, file comment, channel message, group message, or direct message).
This method has the URL https://slack.com/api/reactions.get and follows the Slack Web API calling conventions.
| Argument | Example | Required | Description |
|---|---|---|---|
token |
xxxx-xxxxxxxxx-xxxx |
Required | Authentication token (Requires scope: |
file |
F1234567890 |
Optional | File to get reactions for. |
file_comment |
Fc1234567890 |
Optional | File comment to get reactions for. |
channel |
C1234567890 |
Optional | Channel where the message to get reactions for was posted. |
timestamp |
1234567890.123456 |
Optional | Timestamp of the message to get reactions for. |
full |
Optional | If true always return the complete reaction list. |
The response contains the item with reactions.
{
"type": "message",
"channel": "C2147483705",
"message": {
...
"reactions": [
{
"name": "astonished",
"count": 3,
"users": [ "U1", "U2", "U3" ]
},
{
"name": "clock1"
"count": 2,
"users": [ "U1", "U2", "U3" ]
}
]
},
},
Different item types can be reacted to. The item returned has a type property, the
other properties depend on the type of item. The possible types are:
message: the item will have a message property containing a message object and a channel property containing the channel ID for the message.file: this item will have a file property containing a file object.file_comment: the item will have a file property containing the file object and a comment property containing the file comment.The users array in the reactions property might not always contain all users that have reacted (we limit it to X users, and X might change), however count will always represent the count of all
users who made that reaction (i.e. it may be greater than users.length). If the authenticated user has a given reaction then they are guaranteed to appear in the users array, regardless of
whether count is greater than users.length or not. If the complete list of users is required they can still be obtained by specifying the full argument.
This table lists the expected errors that this method could return.
However, other errors can be returned in the case where the service is down
or other unexpected factors affect processing. Callers should always
check the value of the ok params in the response.
| Error | Description |
|---|---|
bad_timestamp |
Value passed for |
file_not_found |
File specified by |
file_comment_not_found |
File comment specified by |
message_not_found |
Message specified by |
no_item_specified |
|
not_authed |
No authentication token provided. |
invalid_auth |
Invalid authentication token. |
account_inactive |
Authentication token is for a deleted user or team. |
invalid_array_arg |
The method was passed a PHP-style array argument (e.g. with a name like |
invalid_charset |
The method was called via a |
invalid_form_data |
The method was called via a |
invalid_post_type |
The method was called via a |
missing_post_type |
The method was called via a |
request_timeout |
The method was called via a |
This table lists the expected warnings that this method will return. However, other warnings can be returned in the case where the service is experiencing unexpected trouble.
| Warning | Description |
|---|---|
missing_charset |
The method was called via a |
superfluous_charset |
The method was called via a |