replace_managed_bot_token()

Client.replace_managed_bot_token()

Use this method to revoke the current token of a managed bot and generate a new one.

Usable by Users Bots
Parameters:

user_id (int | str) – Unique identifier (int) or username (str) of the managed bot whose token will be replaced.

Returns:

str – On success, new bot token is returned.