Request a list of reactions on a message and toggle a reaction for your user.
Returns a list of reactions on a message, including a list of users and the timestamps the users reacted in the following form:
{ "<Emoji short name>" : [ { "userId": "<The users GUID>", "timestamp": <Timestamp> }, ... ], ... }
RESPONSE Fields | Value Type | Description |
---|---|---|
Emoji short name | String | The short name of the emoji used as reaction, without the surrounding colons |
userId | String | The GUID of the user who reacted using this emoji |
timestamp | long | The timestamp in seconds since 1970-01-01 00:00:00+UTC |
# Request # Use bearer token for authorization GET /api/cowork/teams/3n1ytbwme7ngfyn9g9guwwurt/channels/epmlsh7trr535mrs9z7xcfn1w/messages/00kunwfaycw5sqp8gc8kc0jms/reactions HTTP/1.1 Accept: */* Authorization: Bearer VGhpcyBpcyBqdXN0IGEgZGVtbyBhY2Nlc3MgdG9rZW4u # Response HTTP/1.1 200 OK Content-Type: application/json { "grinning": [ { "userId": "5fwm7rvh5oitb1i2r007zg2u8", "timestamp": 1683612960239 } ], "white_check_mark": [ { "userId": "5fwm7rvh5oitb1i2r007zg2u8", "timestamp": 1683612991691 } ] }
Send a request to toggle a given Emoji for the current user:
{ "toggleEmoji": "<Emoji>" } # Example { "toggleEmoji": "grinning" } # Alternative { "toggleEmoji": ":-D" }
REQUEST Fields | Value Type | Description |
---|---|---|
toggleEmoji | String | The short name of an emoji used to toggle the reaction, without the surrounding colons. Alternatively use the textual shortcut, such as :-D or a emoji |
# Request # Use bearer token for authorization POST /api/cowork/teams/3n1ytbwme7ngfyn9g9guwwurt/channels/epmlsh7trr535mrs9z7xcfn1w/messages/00kunwfaycw5sqp8gc8kc0jms/reactions HTTP/1.1 Accept: */* Authorization: Bearer VGhpcyBpcyBqdXN0IGEgZGVtbyBhY2Nlc3MgdG9rZW4u {"toggleEmoji":":-D"} # Response (Note, the message started with no reaction) HTTP/1.1 200 OK Content-Type: application/json { "white_check_mark": [ { "userId": "5fwm7rvh5oitb1i2r007zg2u8", "timestamp": 1683612991691 } ] }