auth.importBotAuthorization

Login as a bot

 Method schema is available as of layer 24. Switch ยป

Parameters

Name Type Description
flags int Reserved for future use
api_id int Application identifier (see. App configuration)
api_hash string Application identifier hash (see. App configuration)
bot_auth_token string Bot token (see bots)

Result

auth.Authorization

Possible errors

Code Type Description
400 ACCESS_TOKEN_EXPIRED Access token expired.
400 ACCESS_TOKEN_INVALID Access token invalid.
400 API_ID_INVALID API ID invalid.
400 API_ID_PUBLISHED_FLOOD This API id was published somewhere, you can't use it now.

Bots can use this method

Related pages

Bots: An introduction for developers