log_out()#

Client.log_out()[source]#

Log out from Telegram and delete the *.session file.

When you log out, the current client is stopped and the storage session deleted. No more API calls can be made until you start the client and re-authorize again.

Usable by Users Bots
Returns:

bool – On success, True is returned.

Raises:

RPCError – In case of a Telegram RPC error.

Example

# Log out.
app.log_out()