Use this message to recall an existing message.
Field | Type | Required | Description |
method | String | Yes | "recallMessage" |
chat_id | String | Yes | Unique identifier of Chat_id. |
message_id | String | Yes | Global Unique identifier for message requested to be recalled. |
from_user_id | String | Optional | The original sender ID is mandatory in case the bot is the admin of the chat. |
reference | Long | Yes | Unique local identifier for the target Chat or User. |
Requests
json{ "method": "recallMessage", "chat_id": "4522291356145774", "message_id": "d2_F4k48l1t12617132" }
javaelse if(text.equals("recallMessage")){ RecallOutMessage outmsg = new RecallOutMessage(); outmsg.setMessageId("<message_id>"); outmsg.setChatId("<chat_id>"); outmsg.setReference(Utils.getUniqueId()); // make sure to replace message id and chat id with real values api.send(outmsg); }
javascriptlet recallOutMessage = new RecallOutMessage(); recallOutMessage.chatId = "90090684265384780"; recallOutMessage.messageId = "d1_CIRKHD6C12617260"; recallOutMessage.reference = 6915; recallOutMessage.setFromUserId = "90089584801498185";
pythonrecallMsg = RecallOutMessage() recallMsg.message_id="messageId" recallMsg.chat_id="chatId" napi.send(recallMsg)
Response
json{ "method": "message", "message": { "date": 1600168078602, "reference": 2097, "chat": { "name": "Alice Park", "id": "90089668723575679", "terminal": "Mobile", "type": "Contact", "version": "('0HNt','1QBk','2c2H','31RN')" }, "sent_to": { "id": "90091903321704167" }, "message_id": "i1_CD11KwDr126551", "style": 6, "from": { "name": "Alice Park", "id": "90089668723575679", "terminal": "Mobile", "type": "Contact", "version": "('0HNt','1QBk','2c2H','31RN')" }, "text": "Hello", "type": "text" } }