Link Search Menu Expand Document

Method: messages.getMessages

Back to methods index

Warning: flood wait

Warning: this method is prone to rate limiting with flood waits, please use the updates event handler, instead »

Warning: non-realtime results

Warning: this method is not suitable for receiving messages in real-time from chats and users, please use the updates event handler, instead »

Warning: this is probably NOT what you need

You probably need to use the updates event handler, instead » :)

Please use the event handler

Parameters:

NameTypeDescriptionRequired
idArray of Message ID or InputMessageMessage ID listYes

Return type: messages.Messages

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

// PHP 8+ syntax, use an array on PHP 7.
$messages_Messages = $MadelineProto->messages->getMessages(id: [InputMessage, InputMessage], );