Link Search Menu Expand Document

Method: messages.getSavedHistory

Back to methods index

Parameters:

NameTypeRequired
peerUsername, chat ID, Update, Message or InputPeerOptional
offset_idintOptional
offset_dateintOptional
add_offsetintOptional
limitintOptional
max_idintOptional
min_idintOptional
hashArray of longOptional

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

$messages_Messages = $MadelineProto->messages->getSavedHistory(peer: $InputPeer, offset_id: $int, offset_date: $int, add_offset: $int, limit: $int, max_id: $int, min_id: $int, hash: [$long, $long], );