setPassword - libtd-ktx

Kotlin Coroutines extensions for Telegram API TDLib (Telegram Database library)


libtd-ktx / kotlinx.telegram.coroutines / setPassword

setPassword

suspend fun TelegramFlow.setPassword(oldPassword: String?, newPassword: String?, newHint: String?, setRecoveryEmailAddress: Boolean, newRecoveryEmailAddress: String?): PasswordState

Suspend function, which changes the password for the user. If a new recovery email address is specified, then the change will not be applied until the new recovery email address is confirmed.

Parameters

oldPassword - Previous password of the user.

newPassword - New password of the user; may be empty to remove the password.

newHint - New password hint; may be empty.

setRecoveryEmailAddress - Pass true if the recovery email address should be changed.

newRecoveryEmailAddress - New recovery email address; may be empty.

Return PasswordState Represents the current state of 2-step verification.