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 serviceOptional
public_keystringService’s public keyOptional
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();

$Bool = $MadelineProto->account->acceptAuthorization(bot_id: $long, scope: 'string', public_key: 'string', value_hashes: [$SecureValueHash, $SecureValueHash], credentials: $SecureCredentialsEncrypted, );