# 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:

Name Type Description Required
channel Username, chat ID, Update, Message or InputChannel Source channel Optional
msg_id int Source message ID Yes
offset_rate int Initially 0, then set to the next_rate parameter of messages.messagesSlice Yes
offset_peer Username, chat ID, Update, Message or InputPeer Offsets for pagination, for more info click here Optional
offset_id int Offsets for pagination, for more info click here Yes
limit int Maximum number of results to return, see pagination Yes

# 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');

$messages_Messages = $MadelineProto->stats->getMessagePublicForwards(['channel' => InputChannel, 'msg_id' => int, 'offset_rate' => int, 'offset_peer' => InputPeer, 'offset_id' => int, 'limit' => int, ]);

Or, if you’re into Lua:

messages_Messages = stats.getMessagePublicForwards({channel=InputChannel, msg_id=int, offset_rate=int, offset_peer=InputPeer, offset_id=int, limit=int, })

# Errors

Code Type Description
400 CHANNEL_INVALID The provided channel is invalid
400 CHAT_ADMIN_REQUIRED You must be an admin in this chat to do this
400 MESSAGE_ID_INVALID The provided message id is invalid
This site uses cookies, as described in the cookie policy. By clicking on "Accept" you consent to the use of cookies.