set_inactive_session_ttl()

Client.set_inactive_session_ttl()

Changes the period of inactivity after which sessions will automatically be terminated.

Usable by Users Bots
Parameters:

inactive_session_ttl_days (int) – New number of days of inactivity before sessions will be automatically terminated, 1-366 days.

Returns:

bool – On success, True is returned.

Example

# Set inactive session ttl to 1 year
await app.set_inactive_session_ttl(365)