Skip to content

deleteBusinessMessages

Returns boolean

Delete messages on behalf of a business account. Requires the can_delete_sent_messages business bot right to delete messages sent by the bot itself, or the can_delete_all_messages business bot right to delete any message.

Required: business_connection_id, message_ids

Try it
Token saved
Response

TypeScript example · @effect-ak/tg-bot-client
import { makeTgBotClient } from "@effect-ak/tg-bot-client"
const client = makeTgBotClient({ bot_token: "YOUR_BOT_TOKEN" })
const result = await client.execute("delete_business_messages", {
business_connection_id: "...",
message_ids: []
})

Parameters

business_connection_id string Required
Unique identifier of the business connection on behalf of which to delete the messages.

message_ids number[] Required
A JSON-serialized list of 1-100 identifiers of messages to delete. All messages must be from the same chat. See deleteMessage for limitations on which messages can be deleted.

deleteChatPhoto · deleteChatStickerSet · deleteForumTopic · deleteMessage · deleteMessages · deleteMyCommands · deleteStickerFromSet · deleteStickerSet · deleteStory · deleteWebhook