Link Search Menu Expand Document

Method: account.acceptAuthorization

Back to methods index

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


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

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

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