Link Search Menu Expand Document

Method: messages.forwardMessages

Back to methods index

Forwards messages by their IDs.

Parameters:

NameTypeDescriptionRequired
silentBoolWhether to send messages silently (no notification will be triggered on the destination clients)Optional
backgroundBoolWhether to send the message in backgroundOptional
with_my_scoreBoolWhen forwarding games, whether to include your score in the gameOptional
drop_authorBoolWhether to forward messages without quoting the original authorOptional
drop_media_captionsBoolWhether to strip captions from mediaOptional
noforwardsBoolOnly for bots, disallows further re-forwarding and saving of the messages, even if the destination chat doesn’t have content protection enabledOptional
allow_paid_floodskipBoolOptional
from_peerUsername, chat ID, Update, Message or InputPeerSource of messagesOptional
idArray of intIDs of messagesYes
to_peerUsername, chat ID, Update, Message or InputPeerDestination peerOptional
top_msg_idintDestination forum topicOptional
schedule_dateintScheduled message date for scheduled messagesOptional
send_asUsername, chat ID, Update, Message or InputPeerForward the messages as the specified peerOptional
quick_reply_shortcutInputQuickReplyShortcutOptional

Return type: Updates

Can bots use this method: YES

MadelineProto Example (now async for huge speed and parallelism!):

if (!file_exists('madeline.php')) {
    copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';

$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();

$Updates = $MadelineProto->messages->forwardMessages(silent: $Bool, background: $Bool, with_my_score: $Bool, drop_author: $Bool, drop_media_captions: $Bool, noforwards: $Bool, allow_paid_floodskip: $Bool, from_peer: $InputPeer, id: [$int, $int], to_peer: $InputPeer, top_msg_id: $int, schedule_date: $int, send_as: $InputPeer, quick_reply_shortcut: $InputQuickReplyShortcut, );