Post
/api/v1/chat.react
React or unreact to a chat message.
Changelog
| Version | Description |
|---|---|
| 0.64.0 | Added parameter "shouldReact" to make endpoint work like a setter |
| 0.63.0 | Emoji has to exist |
| 0.62.2 | Added |
Header parameters
X-Auth-Token
stringRequired
The authToken of the authenticated user.
ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-Id
stringRequired
The userId of the authenticated user.
ExamplerbAXPnMktTFbNpwtJ
Body parameters
The emoji doesn't have to contain :. However, the emoji must exist. Using either the emoji or reaction parameter is required.
Example 1
{
"messageId": "7aDSXtjMA3KPLxLjt",
"emoji": "smile",
"shouldReact": true
}object
messageId
string Required
The message ID to react to.
emoji
string
The emoji to react with. It's required if you aren't using the reaction parameter.
reaction
string
The reaction to use. It's required if you aren't using the emoji parameter.
shouldReact
boolean
Boolean to specify if the reaction should be added or removed.
Responses
200
OK
Success
{
"success": true
}object
success
boolean
400
Bad Request
Example 1
{
"success": false,
"error": "The required \"messageId\" param is missing. [error-messageid-param-not-provided]",
"errorType": "error-messageid-param-not-provided"
}Example 2
{
"success": false,
"error": "The provided \"messageId\" does not match any existing message. [error-message-not-found]",
"errorType": "error-message-not-found"
}object
success
boolean
error
string
errorType
string
401
Unauthorized
Authorization Error
{
"status": "error",
"message": "You must be logged in to do this."
}object
status
string
message
string