Link Search Menu Expand Document

Method: auth.bindTempAuthKey

Back to methods index

You cannot use this method directly, instead modify the PFS and default_temp_auth_key_expires_in settings, see https://docs.madelineproto.xyz/docs/SETTINGS.html for more info

Parameters:

NameTypeDescriptionRequired
perm_auth_key_idlongPermanent auth_key_id to bind toYes
noncelongRandom long from Binding message contentsYes
expires_atintUnix timestamp to invalidate temporary key, see Binding message contentsOptional
encrypted_messagebytesSee Generating encrypted_messageYes

Return type: Bool

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

$Bool = $MadelineProto->auth->bindTempAuthKey(perm_auth_key_id: $long, nonce: $long, expires_at: $int, encrypted_message: 'bytes', );