Skip to main content

Delete message

Delete message from chat or channel

Function DeleteMessage(Val Token, Val ChatID, Val MessageID) Export

ParameterCLI optionTypeRequiredDescription
Token--tokenStringToken
ChatID--chatString, NumberTarget chat ID
MessageID--messageString, NumberID of message to delete

Returns: Map Of KeyAndValue - serialized JSON response from Telegram


tip

Method at API documentation: deleteMessage


1C:Enterprise/OneScript code example
    Token     = "6129457865:AAFyzNYOAFbu...";
ChatID = "@testsichee";
MessageID = "10111";

Result = OPI_Telegram.DeleteMessage(Token, ChatID, MessageID);
    oint telegram DeleteMessage \
--token "***" \
--chat "@testsichee" \
--message "10481"
Result
{
"ok": true,
"result": true
}