Link Search Menu Expand Document

Method: auth.importBotAuthorization

Back to methods index

You cannot use this method directly, use the botLogin method instead (see for more info)


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('', 'madeline.php');
include 'madeline.php';

$MadelineProto = new \danog\MadelineProto\API('session.madeline');

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