How to Send Telegram Ephemeral Bot Messages in Group Chats
Telegram bots can now send an ephemeral message inside a group or supergroup that only one selected user and the bot can see. For a normal bot, the reply must follow an eligible callback or ephemeral message within 15 seconds. A chat-administrator bot can initiate one for any non-bot member at any time. Delivery is not guaranteed, especially when the recipient is offline.
Key takeaways
- Bot API 10.2 introduced private, per-user bot messages and ephemeral commands on July 14, 2026.
- Set a command’s
is_ephemeralfield totruewhen the user’s command should stay hidden from other members and bots. - A non-admin bot needs a recent
callback_query_idorreply_parameters.ephemeral_message_id; the response window is 15 seconds. - An administrator bot can target any non-bot member without those trigger identifiers, but delivery still remains best effort.
- Ephemeral messages are interface feedback, not a durable audit log or a cross-platform message type.
What is a Telegram ephemeral bot message?
An ephemeral bot message is a private response displayed on a group or supergroup timeline to one user. Other group members and other bots do not see it. Telegram lists welcomes, private AI summaries, errors, confirmations, contextual hints, and button menus as suitable examples.
This is different from Telegram Guest Mode. Guest Mode determines how a bot can be summoned in a chat it has not joined. Ephemeral messaging determines who can see a particular command or bot response. It is also separate from Bot API 10.1 Rich Messages, which changed formatting rather than visibility.
Telegram says these interactions may disappear automatically after some time or when the app restarts. The official documentation does not publish a fixed lifetime, so do not use the visible message as the only record of an approval, payment state, support decision, or other durable business event.
Which bots can send private replies in groups?
There are two permission paths. Choose the path before designing the handler because the required identifiers and delivery behavior differ.
| Bot context | When it can send | Required trigger data | Delivery scope |
|---|---|---|---|
| Any bot | Within 15 seconds of an eligible incoming action | callback_query_id or reply_parameters.ephemeral_message_id | The client app that triggered the action |
| Chat-administrator bot | At any time to a non-bot member | Neither trigger identifier is required | May reach several active clients, but is not guaranteed |
Both paths use receiver_user_id to select the viewer. Ephemeral outgoing messages are limited to groups and supergroups. They are not a replacement for a direct-message conversation.
The delivery caveat is important: Telegram explicitly says receipt is not guaranteed, especially if the user is offline. Design the message as convenient UI feedback. If the action changes server state, persist that state first and let the user retrieve it again later.
Step 1: declare an ephemeral command
Use setMyCommands and set is_ephemeral to true for commands whose invocation should remain private. The following hypothetical command keeps a user’s /summary request hidden from all other group members and bots:
curl "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/setMyCommands" \
-H "Content-Type: application/json" \
-d '{
"commands": [
{
"command": "summary",
"description": "Summarize this discussion for me",
"is_ephemeral": true
}
],
"scope": {
"type": "all_group_chats"
}
}'
is_ephemeral affects the command sent by the user. It does not by itself choose the recipient of every later bot message. Your send request still needs the correct chat, viewer, and—unless the bot is an administrator—an eligible trigger.
Step 2: send a private group reply
For a callback-triggered response, call a supported send method with chat_id, receiver_user_id, and callback_query_id. Bot API 10.2 added the two ephemeral parameters to sendMessage and to supported media, file, contact, and location methods.
This hypothetical request sends a confirmation to one member of a supergroup:
curl "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \
-H "Content-Type: application/json" \
-d '{
"chat_id": -1001234567890,
"receiver_user_id": 424242424,
"callback_query_id": "4382bfdwdsb323b2d9",
"text": "Your report is ready. Only you can see this confirmation."
}'
Send the request within the 15-second window. If the trigger was an incoming ephemeral message rather than a callback query, reply with reply_parameters.ephemeral_message_id instead. Do not substitute a normal message_id; Bot API 10.2 specifically makes message_id optional when the ephemeral identifier is present.
For an administrator bot initiating a message without a recent action, omit callback_query_id and the ephemeral reply target, but still provide the group chat_id and the non-bot member’s receiver_user_id.
Step 3: edit or delete with the ephemeral identifier
Store the ephemeral_message_id returned in the Telegram Message object together with the chat_id and receiver_user_id. The normal edit and delete methods are not the right lifecycle API for this message type.
Use the dedicated methods:
editEphemeralMessageTexteditEphemeralMessageMediaeditEphemeralMessageCaptioneditEphemeralMessageReplyMarkupdeleteEphemeralMessage
For example, a text edit needs all three identity fields:
{
"chat_id": -1001234567890,
"receiver_user_id": 424242424,
"ephemeral_message_id": 781,
"text": "The report is ready to download."
}
Telegram also warns that edit and delete events may not reach an offline user. Treat lifecycle calls as best-effort UI updates, not as proof that a person saw—or stopped seeing—sensitive information.
Implementation checklist
- Classify the response. Use an ephemeral message for personal feedback that should appear in group context, not for records the team must retain.
- Capture the trigger immediately. Keep
callback_query_idor the incomingephemeral_message_idonly as long as needed to satisfy the 15-second path. - Authorize on the server. Hidden visibility is not authorization. Verify that the caller may request the summary, menu, or action before producing it.
- Persist durable state separately. Save approvals, job status, and support actions in your own database before acknowledging them in the UI.
- Use dedicated lifecycle methods. Store
chat_id,receiver_user_id, andephemeral_message_idas one lookup tuple for edits and deletion. - Design for no delivery. Offer a normal private-chat, dashboard, or retry path when the user must be able to recover the result.
- Test roles and clients. Cover a normal bot, an administrator bot, group and supergroup chats, multiple active devices, and an offline recipient.
Where UnifyPort fits—and where it does not
Telegram ephemeral messages are a Telegram Bot API feature. The current UnifyPort API reference does not document receiver_user_id, callback_query_id, or the ephemeral edit/delete methods for POST /v1/messages. Use Telegram’s official Bot API when your product depends on that per-user group interface.
UnifyPort solves a different layer: ordinary inbound messages from supported accounts can arrive as the normalized message.received event, while supported standard replies use one message API across providers. That helps when a team needs a durable queue spanning Telegram, WhatsApp, LINE, Zalo, TikTok, and X. It does not turn another platform’s message into a Telegram ephemeral response or preserve Telegram-only visibility semantics.
If the real requirement is multi-channel support rather than a Telegram-only bot surface, the cross-channel Telegram automation guide explains the architecture boundary.
Limitations and trade-offs
Choose the official Bot API feature when a bot must show a private confirmation, error, menu, or summary without moving a user out of the group. It gives Telegram clients native per-user visibility and supports text plus several media and utility message types.
Do not choose it for guaranteed alerts, compliance records, durable support history, or secrets that must be retractable. Delivery, edits, and deletion are not guaranteed for offline users; the message may disappear; and the official docs do not promise a fixed lifetime. An unofficial interface cannot change those platform guarantees or add ephemeral behavior to other channels.
FAQ
Can a Telegram bot send a message visible to only one group member?
Yes. In a group or supergroup, provide receiver_user_id and satisfy either the 15-second eligible-trigger path or the chat-administrator path. Only the chosen user and the bot can see the ephemeral message.
Does a bot need to be a group administrator?
Not always. Any bot can respond within 15 seconds when it has the relevant callback_query_id or incoming ephemeral reply identifier. An administrator bot can initiate an ephemeral message to any non-bot member without those trigger identifiers.
How long does a Telegram ephemeral bot message last?
Telegram does not publish a fixed lifetime. Its documentation says the interaction may disappear automatically after some time or when the app restarts, so applications should not treat it as durable storage.
Can an offline user receive an ephemeral message?
Delivery is not guaranteed, especially when the user is offline. Edits and deletion events have the same caveat. Provide a recoverable path for important results.
Are ephemeral messages the same as Telegram Guest Mode?
No. Guest Mode controls how a bot can participate without joining a chat. Ephemeral messages control the visibility of a command or reply inside a group. The features can complement each other, but they solve different problems.
Next step
Implement the Telegram-specific path against the official Bot API ephemeral message reference. If the rest of your workflow needs durable messages across several providers, check the UnifyPort provider message-support matrix before designing the shared handler.
Sources
Official sources checked on July 20, 2026: