Link Search Menu Expand Document

Method: account.acceptAuthorization

Back to methods index

Sends a Telegram Passport authorization form, effectively sharing data with the service

Parameters:

NameTypeDescriptionRequired
bot_idlongBot IDYes
scopestringTelegram Passport element types requested by the serviceYes
public_keystringService’s public keyYes
value_hashesArray of SecureValueHashTypes of values sent and their hashesYes
credentialsSecureCredentialsEncryptedEncrypted valuesYes

Return type: Bool

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

// PHP 8+ syntax, use an array on PHP 7.
$Bool = $MadelineProto->account->acceptAuthorization(bot_id: long, scope: 'string', public_key: 'string', value_hashes: [SecureValueHash, SecureValueHash], credentials: SecureCredentialsEncrypted, );