Skip to content

forwardMessage ​

Use this method to forward messages of any kind. Service messages and messages with protected content can't be forwarded. On success, the sent Message is returned.

Parameters ​

chat_idIntegerStringRequired
Unique identifier for the target chat or username of the target bot, supergroup or channel in the format @username
message_thread_idIntegerOptional
Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
direct_messages_topic_idIntegerOptional
Identifier of the direct messages topic to which the message will be forwarded; required if the message is forwarded to a direct messages chat
from_chat_idIntegerStringRequired
Unique identifier for the chat where the original message was sent (or username of the target bot, supergroup or channel in the format @username)
video_start_timestampIntegerOptional
New start timestamp for the forwarded video in the message
disable_notificationBooleanOptional
Sends the message silently. Users will receive a notification with no sound.
protect_contentBooleanOptional
Protects the contents of the forwarded message from forwarding and saving
message_effect_idStringOptional
Unique identifier of the message effect to be added to the message; only available when forwarding to private chats
suggested_post_parametersSuggestedPostParametersOptional
A JSON-serialized object containing the parameters of the suggested post to send; for direct messages chats only
message_idIntegerRequired
Message identifier in the chat specified in from\chat\id

Returns ​

On success, the Message object is returned.

GramIO Usage ​

ts
// Forward every user message to an admin/moderation chat
const 
ADMIN_CHAT_ID
= -1001234567890;
bot
.
on
("message", async (
ctx
) => {
await
bot
.
api
.
forwardMessage
({
chat_id
:
ADMIN_CHAT_ID
,
from_chat_id
:
ctx
.
chatId
,
message_id
:
ctx
.
id
,
}); });
ts
// Forward a specific message from a channel to another chat
await 
bot
.
api
.
forwardMessage
({
chat_id
: -1009876543210, // destination chat
from_chat_id
: "@sourcechannel",
message_id
: 501,
});
ts
// Forward silently with protected content (prevents re-forwarding)
await 
bot
.
api
.
forwardMessage
({
chat_id
: -1001234567890,
from_chat_id
: -1009876543210,
message_id
: 42,
disable_notification
: true,
protect_content
: true,
});
ts
// Forward into a specific forum topic thread
await 
bot
.
api
.
forwardMessage
({
chat_id
: -1001234567890, // forum supergroup
message_thread_id
: 5, // topic ID
from_chat_id
: "@mychannel",
message_id
: 99,
});

Errors ​

CodeErrorCause
400Bad Request: chat not foundTarget chat_id is invalid or the bot is not a member — verify the bot was added to the destination chat
400Bad Request: message to forward not foundmessage_id doesn't exist in from_chat_id — verify both IDs before forwarding
400Bad Request: CHAT_FORWARD_RESTRICTThe source chat has disabled message forwarding — the content cannot be forwarded from it
400Bad Request: message can't be forwardedMessage is a service message (join, leave, pin, etc.) — service messages cannot be forwarded
403Forbidden: bot was blocked by the userUser blocked the bot — catch and mark user as inactive
403Forbidden: bot is not a member of the channel chatBot is not in the target channel — add it first
429Too Many Requests: retry after NRate limit hit — check retry_after, use auto-retry plugin

TIP

Use GramIO's auto-retry plugin to handle 429 errors automatically.

Tips & Gotchas ​

  • Forwarded messages show "Forwarded from" attribution. To forward without showing the original source, use copyMessage instead — it copies the content without attribution.
  • Service messages can't be forwarded. Join/leave events, pinned message notifications, and similar service messages always fail — use isServiceMessage() to filter them out.
  • Messages with protect_content can't be forwarded. If the original message was sent with protect_content: true, it's permanently blocked from forwarding.
  • protect_content on the forwarded copy is independent. Setting protect_content: true in your forwardMessage call prevents recipients from re-forwarding the copy you send.
  • message_effect_id only works for private chats. Reaction effects on forwarded messages are restricted to private conversations — they're silently ignored in groups and channels.
  • video_start_timestamp lets you deep-link into video messages. Specify a second offset to start playback partway through the video when forwarding.
  • Use message_thread_id for forum supergroups. Without it, the message goes to the general/unthreaded area; with it, it lands in the specified topic.

See Also ​

  • forwardMessages — forward multiple messages in a single call (preserves album grouping)
  • copyMessage — copy a message without "Forwarded from" attribution
  • copyMessages — copy multiple messages without attribution
  • Message — the full object returned on success
  • MessageOrigin — origin info available in forwarded message objects
  • auto-retry plugin — automatic 429 retry handling