curl -X DELETE \
-H "Content-Type: application/json" \
-H "QB-Token: eddf864695d72d33b959eec2ae6c640d817dfada" \
-d '{
"name":"like"
}' \
https://api.quickblox.com/chat/Message/5d75327ba28f9a0f32cb0f99/reactions
Empty body
// Missing or invalid "message_id" parameter.
{
"errors": [
"Invalid or missing \"message_id\" parameter."
]
}
// Missing or invalid "name" parameter.
{
"errors": [
"Invalid or missing \"name\" parameter."
]
}
// Reaction not found
{
"errors": [
"Reaction not found for the specified user and message ID."
]
}
// Message not found
{
"errors": [
"Message not found for the specified user and message ID."
]
}
Chat
Remove Reaction
Remove a previously added reaction from a message.
Added in v2.58.0
DELETE
/
chat
/
Message
/
{chat_message_id}
/
reactions
curl -X DELETE \
-H "Content-Type: application/json" \
-H "QB-Token: eddf864695d72d33b959eec2ae6c640d817dfada" \
-d '{
"name":"like"
}' \
https://api.quickblox.com/chat/Message/5d75327ba28f9a0f32cb0f99/reactions
Empty body
// Missing or invalid "message_id" parameter.
{
"errors": [
"Invalid or missing \"message_id\" parameter."
]
}
// Missing or invalid "name" parameter.
{
"errors": [
"Invalid or missing \"name\" parameter."
]
}
// Reaction not found
{
"errors": [
"Reaction not found for the specified user and message ID."
]
}
// Message not found
{
"errors": [
"Message not found for the specified user and message ID."
]
}
Recipes
Remove a reaction from message
Remove a reaction from message
1
1. Set the message ID
Provide the
message_id of the message from which you want to remove a reaction.curl -X DELETE \
-H "Content-Type: application/json" \
-H "QB-Token: 2e80acd7f3d9c1e79312e0d1dafd6691ba012bba" \
-d '{
"name": "like"
}' \
https://api.quickblox.com/chat/Message/5d75327ba28f9a0f32cb0f99/reactions
2
2. Set the reaction type to remove
Provide the
name of the reaction that should be removed.
It must match the reaction previously added by the same user.curl -X DELETE \
-H "Content-Type: application/json" \
-H "QB-Token: 2e80acd7f3d9c1e79312e0d1dafd6691ba012bba" \
-d '{
"name": "like"
}' \
https://api.quickblox.com/chat/Message/5d75327ba28f9a0f32cb0f99/reactions
3
3. As a result, the API returns a '200 OK' status code, indicating that the reaction was removed.
curl -X DELETE \
-H "Content-Type: application/json" \
-H "QB-Token: 2e80acd7f3d9c1e79312e0d1dafd6691ba012bba" \
-d '{
"name": "like"
}' \
https://api.quickblox.com/chat/Message/5d75327ba28f9a0f32cb0f99/reactions
Remove a reaction from message with API key
Remove a reaction from message with API key
1
1. Use 'Authorization' header to pass API key
curl -X GET \
-H "Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI" \
-H "On-Behalf-Of: 123" \
-d '{
"name": "like"
}' \
https://api.quickblox.com/chat/Message/5d75327ba28f9a0f32cb0f99/reactions
2
2. Use 'On-Behalf-Of' header to pass user id
curl -X GET \
-H "Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI" \
-H "On-Behalf-Of: 123" \
-d '{
"name": "like"
}' \
https://api.quickblox.com/chat/Message/5d75327ba28f9a0f32cb0f99/reactions
3
3. Set the message ID
Provide the
message_id of the message from which you want to remove a reaction.curl -X DELETE \
-H "Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI" \
-H "On-Behalf-Of: 123" \
-d '{
"name": "like"
}' \
https://api.quickblox.com/chat/Message/5d75327ba28f9a0f32cb0f99/reactions
4
4. Set the reaction type to remove
Provide the
name of the reaction that should be removed.
It must match the reaction previously added by the same user.curl -X DELETE \
-H "Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI" \
-H "On-Behalf-Of: 123" \
-d '{
"name": "like"
}' \
https://api.quickblox.com/chat/Message/5d75327ba28f9a0f32cb0f99/reactions
5
5. As a result, the API returns a '200 OK' status code, indicating that the reaction was removed.
curl -X DELETE \
-H "Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI" \
-H "On-Behalf-Of: 123" \
-d '{
"name": "like"
}' \
https://api.quickblox.com/chat/Message/5d75327ba28f9a0f32cb0f99/reactions
Path Parameters
string
required
ID of the message. Generated automatically by the server after message creation.
Body Parameters
string
required
The type of reaction to remove.
Examples:
"like", "love", "haha", "angry".Headers
string
required
A user session token. See Authentication page to learn more about session tokens. Must be used either QB-Token or Authorization.
string
default:"ApiKey {your_api_key}"
API key from Dashboard. Expected format:
ApiKey {your_api_key}. Must be used either QB-Token or Authorization.string
User ID. The user ID of the user on whose behalf the request is being made.
Responses
200
200
Reaction successfully removed
400
400
An error response
array of strings
404
404
An error response
array of strings
curl -X DELETE \
-H "Content-Type: application/json" \
-H "QB-Token: eddf864695d72d33b959eec2ae6c640d817dfada" \
-d '{
"name":"like"
}' \
https://api.quickblox.com/chat/Message/5d75327ba28f9a0f32cb0f99/reactions
Empty body
// Missing or invalid "message_id" parameter.
{
"errors": [
"Invalid or missing \"message_id\" parameter."
]
}
// Missing or invalid "name" parameter.
{
"errors": [
"Invalid or missing \"name\" parameter."
]
}
// Reaction not found
{
"errors": [
"Reaction not found for the specified user and message ID."
]
}
// Message not found
{
"errors": [
"Message not found for the specified user and message ID."
]
}
Was this page helpful?