Answer the question
In order to leave comments, you need to log in
How to get messages from a private channel?
the channel has only title name
$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$settings = array(
'peer' => "<b>???</b>", //название_канала, должно начинаться с @, например @breakingmash
'offset_id' => 10,
'offset_date' => 0,
'add_offset' => 0,
'limit' => 20, //Количество постов, которые вернет клиент
'max_id' => 0, //Максимальный id поста
'min_id' => 0, //Минимальный id поста - использую для пагинации, при 0 возвращаются последние посты.
//'hash' => []
);
$data = $MadelineProto->messages->getHistory($settings);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question