Answer the question
In order to leave comments, you need to log in
How to use MadelineProto (Telegran API) correctly?
Connected MadelineProto , created a class with account data. Everything seems to be working, because. a lot of service information came out. But the page takes about half a minute to load. I don't understand why I'm getting all this information. And when calling any method, it says:
Exception: This peer is not present in the internal peer database in PeerHandler.php:203
include 'phar.php';
$api_settings = [
'authorization' => [
'default_temp_auth_key_expires_in' => 86400,
'rsa_keys' => массив_с_ключами
],
'app_info' => [
'api_id' => ****,
'api_hash' => *********************************
],
];
$MadelineProto = new \danog\MadelineProto\API($api_settings);
$messages_Chats = $MadelineProto->channels->getChannels(['id' => ["id_канала"]]);
Answer the question
In order to leave comments, you need to log in
Here in an article on Habré, the guy wrote in detail how to work with a cart from under php.
In short, you need to create a php script, log in using it. It will save the authorization data to a file, then connect it to MadelineProto and make requests.
For the sake of interest, I performed manipulations from the article, everything worked.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question