Link Search Menu Expand Document

Method: stats.getMessagePublicForwards

Back to methods index

Obtains a list of messages, indicating to which other public channels was a channel message forwarded.
Will return a list of messages with peer_id equal to the public channel to which this message was forwarded.

Parameters:

NameTypeDescriptionRequired
channelUsername, chat ID, Update, Message or InputChannelSource channelOptional
msg_idintSource message IDYes
offset_rateintInitially 0, then set to the next_rate parameter of messages.messagesSliceYes
offset_peerUsername, chat ID, Update, Message or InputPeerOffsets for pagination, for more info click hereOptional
offset_idintOffsets for pagination, for more info click hereYes
limitintMaximum number of results to return, see paginationYes

Return type: messages.Messages

Can bots use this method: NO

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();

// PHP 8+ syntax, use an array on PHP 7.
$messages_Messages = $MadelineProto->stats->getMessagePublicForwards(channel: InputChannel, msg_id: int, offset_rate: int, offset_peer: InputPeer, offset_id: int, limit: int, );