telegram api method · layer 229 · #67a3ff2c

auth.importBotAuthorization

usable by users and bots

Login as a bot

definition

auth.importBotAuthorization#67a3ff2c flags:int api_id:int api_hash:string bot_auth_token:string = auth.Authorization;

parameters

nametypedescription
flagsintReserved for future use
api_idintApplication identifier (see. App configuration)
api_hashstringApplication identifier hash (see. App configuration)
bot_auth_tokenstringBot token (see bots)

returns

auth.Authorization

errors (5)

codeerrordescription
400ACCESS_TOKEN_EXPIREDAccess token expired.
400ACCESS_TOKEN_INVALIDAccess token invalid.
400API_ID_INVALIDAPI ID invalid.
400API_ID_PUBLISHED_FLOODThis API id was published somewhere, you can't use it now.
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.

history

present in layers 46–229

idlayers
#67a3ff2c46–229