curl --request DELETE \
--url https://{appid}.api-{region}.cometchat.io/v3/messages/{id}/reactions/{reaction} \
--header 'apikey: <api-key>' \
--header 'onBehalfOf: <onbehalfof>'
{
"data": {
"id": "2",
"conversationId": "superhero1_user_superhero2",
"sender": "superhero1",
"receiverType": "user",
"receiver": "superhero2",
"category": "message",
"type": "text",
"data": {
"text": "Hi,",
"entities": {
"sender": {
"entity": {
"uid": "superhero1",
"name": "Iron Man",
"role": "default",
"status": "offline"
},
"entityType": "user"
},
"receiver": {
"entity": {
"uid": "superhero2",
"name": "Captain America",
"role": "default",
"status": "offline",
"conversationId": "superhero1_user_superhero2"
},
"entityType": "user"
}
},
"reactions": [
{
"reaction": ":reaction",
"count": 1
},
{
"reaction": "😅",
"count": 1
},
{
"reaction": "😒",
"count": 1,
"reactedByMe": true
}
]
},
"sentAt": 1700210266,
"updatedAt": 1700210266
}
}
Removes a reaction from a message
curl --request DELETE \
--url https://{appid}.api-{region}.cometchat.io/v3/messages/{id}/reactions/{reaction} \
--header 'apikey: <api-key>' \
--header 'onBehalfOf: <onbehalfof>'
{
"data": {
"id": "2",
"conversationId": "superhero1_user_superhero2",
"sender": "superhero1",
"receiverType": "user",
"receiver": "superhero2",
"category": "message",
"type": "text",
"data": {
"text": "Hi,",
"entities": {
"sender": {
"entity": {
"uid": "superhero1",
"name": "Iron Man",
"role": "default",
"status": "offline"
},
"entityType": "user"
},
"receiver": {
"entity": {
"uid": "superhero2",
"name": "Captain America",
"role": "default",
"status": "offline",
"conversationId": "superhero1_user_superhero2"
},
"entityType": "user"
}
},
"reactions": [
{
"reaction": ":reaction",
"count": 1
},
{
"reaction": "😅",
"count": 1
},
{
"reaction": "😒",
"count": 1,
"reactedByMe": true
}
]
},
"sentAt": 1700210266,
"updatedAt": 1700210266
}
}
API Key with fullAccess scope(i.e. Rest API Key from the Dashboard).
UID of the user on whose behalf the action is performed.
Id of the message whose reaction is to be removed.
reaction to be removed.
Remove Reactions
The response is of type object
.
Was this page helpful?