React to Message
- Print
- DarkLight
- PDF
React to Message
- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
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.
Example 1
{
"messageId": "7aDSXtjMA3KPLxLjt",
"emoji": "smile",
"shouldReact": true
}
object
messageId
string Required
The message ID to react to.
emoji
string Required
The emoji to react with.
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
Was this article helpful?