Delete Message

To delete messages to any particular user or group you can use the below API.

info

{api-base-url} can be obtained from the MirrorFly console.

HTTP request#

curl -X POST "https://{api-base-url}/api/v1/chat/deletemessage?deleteForEveryOne=true&messageId=samplemessageId"
-H "accept: application/json;charset=UTF-8"
-H "Authorization: AuthToken"
-H "Content-Type: application/x-www-form-urlencoded"

Request Params#

ParamDataTypeRequiredDescription
deleteForEveryOneBooleanNOBy default, Delete for Everyone will be considered as False, Delete for Me should be performed
messageIdStringYesMessage ID of User/Group to delete message

Responses#

If successful, this action returns below response, in the response body.

{
"status": 200,
"message": "Message deleted successfully"
}

Error#

In the case of an error, an error object like below is returned.

When the token passed in Headers is expired

{
"status": 401,
"message": "Token Expired"
}

In the case of a Bad Request, an error message is returned

{
"status": 400,
"message": "Error Message"
}