Link Search Menu Expand Document

Method: auth.importBotAuthorization

Back to methods index

You cannot use this method directly, use the botLogin method instead (see https://docs.madelineproto.xyz for more info)

Parameters:

NameTypeDescriptionRequired
api_idintApplication identifier (see. App configuration)Optional
api_hashstringApplication identifier hash (see. App configuration)Optional
bot_auth_tokenstringBot token (see bots)Optional

Return type: auth.Authorization

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

$auth_Authorization = $MadelineProto->auth->importBotAuthorization(api_id: $int, api_hash: 'string', bot_auth_token: 'string', );