telegram api method · layer 229 · #cdd42a05

auth.bindTempAuthKey

usable by users and bots

Binds a temporary authorization key temp_auth_key_id to the permanent authorization key perm_auth_key_id. Each permanent key may only be bound to one temporary key at a time, binding a new temporary key overwrites the previous one.

definition

auth.bindTempAuthKey#cdd42a05 perm_auth_key_id:long nonce:long expires_at:int encrypted_message:bytes = Bool;

parameters

nametypedescription
perm_auth_key_idlongPermanent auth_key_id to bind to
noncelongRandom long from Binding message contents
expires_atintUnix timestamp to invalidate temporary key, see Binding message contents
encrypted_messagebytesSee Generating encrypted_message

returns

Bool

errors (5)

codeerrordescription
400BUSINESS_CONNECTION_NOT_ALLOWEDThis method was invoked over a business connection using invokeWithBusinessConnection, but either (1) we're a user, and users cannot invoke methods over a business connection; (2) we're a bot, but business mode was disabled in @botfather or (3); we're a bot, but this method cannot be invoked over a business connection.
400ENCRYPTED_MESSAGE_INVALIDEncrypted message invalid.
400EXPIRES_AT_INVALIDThe specified expires_at timestamp is invalid.
400TEMP_AUTH_KEY_ALREADY_BOUNDThe passed temporary key is already bound to another perm_auth_key_id.
400TEMP_AUTH_KEY_EMPTYNo temporary auth key provided.

history

present in layers 2–229

idlayers
#cdd42a052–229